Mahmoud Saleh
Mahmoud Saleh

Reputation: 33605

How to hide messages with id javax_faces_developmentstage_messages

sometimes, i see generated info messages (not validation) at bottom of xhtml pages with id javax_faces_developmentstage_messages how can i prevent such messages from being generated in a specific page, i don't want to change the attribute of javax.faces.PROJECT_STAGE

i am facing such issue exactly when trying to override default message for uploading file in icefaces it shows both the new and old message (even when using clear before adding the new message), here:

How to override default file upload h:message in ICEfaces

please advise, thanks.

UPDATE:

code:

<ace:fileEntry id="fileEntryComp"
               label="File Entry"
               relativePath="uploaded"
               useSessionSubdir="false"
               fileEntryListener="#{myBean.listener}" /> 

Upvotes: 0

Views: 3126

Answers (2)

Swapnil
Swapnil

Reputation: 1134

if you want to hide " 'File Entry' uploaded successfully 'filename' " message which is generated after the successful upload of a file just add the following in your view

<h:message for="fileEntryComp" infoStyle="display:none" /> 

Upvotes: 0

Mahmoud Saleh
Mahmoud Saleh

Reputation: 33605

i resolved it by adding the new messages to null clientId:

context.addMessage(null, new FacesMessage(message));

and in the view, i added:

<h:messages id="summary"  styleClass="summary" infoStyle="Color:blue;" errorStyle="Color:red;" fatalStyle="margin-right: 85%; Color:red;" globalOnly="true"/> 
<!-- i had to add the following one too -->     
<h:messages for="fileEntryComp" style="display:none;"/> 

Upvotes: 0

Related Questions