Search code examples
jsf-2icefaces-2

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

Solution

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