0 Replies Latest reply on May 11, 2012 2:35 AM by Its Me

    facesContext.maximumSeverity==null not working on load for non richfaces components

    Its Me Newbie



      I have a search screen, with drop downs. The user can select the drop down values and hit search button. In case of any error, we have the following code in the catch block:


                          FacesContext fc = FacesContext.getCurrentInstance();


                              new FacesMessage(FacesMessage.SEVERITY_ERROR, e.toString() + ".Exception occered while Getting   details.\n",

                              e.getLocalizedMessage() + ".Exception occered while Getting   details.\n"));


      and our modal panel consisting of the error shows up:


      <rich:modalPanel id="errMod" width="600" showWhenRendered="#{not (facesContext.maximumSeverity==null)}"  style="padding: 0px;MARGIN: 0px;">

                              <f:facet name="header">


                                      <h:outputText value="Error Status"></h:outputText>



                              <f:facet name="controls">


                                      <img src="#{facesContext.externalContext.requestContextPath}/images/close_icon.gif"  id="errhidelink"/>



                                      <rich:componentControl for="errMod" attachTo="errhidelink" operation="hide" event="onclick"/>



                              <a4j:outputPanel id="errMPanel" ajaxRendered="true" style="padding: 0px;MARGIN: 0px;">

                                  <rich:messages errorClass="errorStyle" globalOnly="true" showDetail="true"

                                                 fatalClass="fatalStyle" warnClass="warnStyle" infoClass="infoStyle" layout="list"></rich:messages>




      This works fine, if there is any error fetching anything displayed by rich/ ajax components.


      The following is the code for the drop downs, which are displayed on load:




                                                          styleClass="LiastDrpL" immediate="true" onchange="showData();" >


                                                              value="#{myBean.selectNameDropDown}" />





      In case of any exception on load of these components, the modal panel does not show any error. The drop down is displayed as empty. We know that the exception is getting generated though, via the log file. Is there anything which we are missing? Isnt there any way to show error of the non richfaces/ a4j components on load?


      Thanks and Regards,

      Its Me......................