How to hide messages with id javax_faces_developmentstage_messages

3k Views Asked by At

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}" /> 
2

There are 2 best solutions below

0
On BEST ANSWER

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;"/> 
0
On

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" />