0 Replies Latest reply on Feb 17, 2010 11:53 AM by Peter Len

    How to capture server exception during page load???

    Peter Len Apprentice



      In my xhtml file, I have the following to load a picklist with values:




      h:selectOneMenu id="iso1" >


        <s:selectItems value="#{myBean.picklistItems}" var="i" label="#{i.label}" itemValue="#{i.value}"/>




      If all is well, the picklist is populated when the page is loaded.  If, however, the server method throws an exception, I would like to be able to present the exception in the client.  In the method's catch block I create both a statusMessage and FacesMessage with the error, but the client "messages" element does not display the error message.  If I simply thrown the error, I get redirected to the SEAM debugger page. 


      How can a server exception during page loading be captured and presented in the client?  There are other items on the page and I do not want to have to redirect the user to some other "error page".  I would like to load the page and present any error messages that were received during page loading.  Is this possible?


      Thanks - Peter