0 Replies Latest reply on Jul 1, 2008 2:50 PM by mail.micke

    Error page design advice wanted

    mail.micke

      Hi


      I'm playing around with creating an error page and have run into a little problem.
      My aim is to create an error page which displays as much information as possible.


      I've used the messages.xhtml page from the wiki for inspiration.


      In pages.xml I redirect all errors to an error.xhtml page.


      I have a page with a page action which executes a method that creates a NPE (errorBacking is EVENT scoped).


      <page xmlns="http://jboss.com/products/seam/pages"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd">
                
           <action execute="#{errorBacking.createNpe}"/>
           
      </page> 
      



      If I have the following in error.xhtml:


      <s:fragment rendered="#{! empty org.jboss.seam.caughtException}">
      <pre>
      <ui:repeat value="#{org.jboss.seam.handledException.stackTrace}" var="stackElement">
              #{stackElement}
      </ui:repeat>
      </pre>
      </s:fragment>
      



      I get this error:


      SEVERE: Error Rendering View[/_errorPages/error.xhtml]
      javax.faces.FacesException: javax.el.PropertyNotFoundException: /_errorPages/error.xhtml @17,66 rendered="#{! empty org.jboss.seam.caughtException}": Property 'caughtException' is not found on type: org.jboss.seam.Namespace
      



      Looking in Conversations.java it looks that the org.jboss.seam.caughtException is set if there is an active conversation (or something similar).


      Also ge the above error for the below xhtml if I access the error page without there being a handled exception:


      <s:fragment rendered="#{! empty org.jboss.seam.handledException}">
      <pre>
      Top level exception : #{org.jboss.seam.handledException.class.name}: #{org.jboss.seam.handledException.message}
      =================================================================================================
      
      <ui:repeat value="#{org.jboss.seam.handledException.stackTrace}" var="stackElement">
              #{stackElement}
      </ui:repeat>
      </pre>
      
      </s:fragment>
      



      Seems like the EL resloves org.jboss.seam to a Namespace object.


      Is the naming of components with dots in the name a good idea?


      Help


      Thanks,


      Micke