[jboss-cvs] jboss-seam/doc/reference/en/modules ...

Peter Muir peter at bleepbleep.org.uk
Fri Aug 31 11:26:18 EDT 2007


  User: pmuir   
  Date: 07/08/31 11:26:18

  Modified:    doc/reference/en/modules  events.xml
  Log:
  JBSEAM-1887 and section on commonly handled exceptions
  
  Revision  Changes    Path
  1.32      +64 -0     jboss-seam/doc/reference/en/modules/events.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: events.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/doc/reference/en/modules/events.xml,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -b -r1.31 -r1.32
  --- events.xml	30 Aug 2007 10:42:29 -0000	1.31
  +++ events.xml	31 Aug 2007 15:26:18 -0000	1.32
  @@ -978,6 +978,70 @@
   
           </sect2>
   
  +        <sect2>
  +            <title>Some common exceptions</title>
  +            
  +            <para>
  +                If you are using JPA:
  +            </para>
  +            
  +            <programlisting><![CDATA[<exception class="javax.persistence.EntityNotFoundException">
  +   <redirect view-id="/error.xhtml">
  +      <message>Not found</message>
  +   </redirect>
  +</exception>
  +
  +<exception class="javax.persistence.OptimisticLockException">
  +   <end-conversation/>
  +   <redirect view-id="/error.xhtml">
  +      <message>Another user changed the same data, please try again</message>
  +   </redirect>
  +</exception>]]></programlisting>
  +
  +            <para>
  +                If you are using the Seam Application Framework:
  +            </para>
  +            
  +            <programlisting><![CDATA[<exception class="org.jboss.seam.framework.EntityNotFoundException">
  +   <redirect view-id="/error.xhtml">
  +      <message>Not found</message>
  +   </redirect>
  +</exception>]]></programlisting>
  +    
  +            <para>
  +                If you are using Seam Security:
  +            </para>
  +    
  +            <programlisting><![CDATA[<exception class="org.jboss.seam.security.AuthorizationException">
  +   <redirect>
  +      <message>You don't have permission to do this</message>
  +   </redirect>
  +</exception>
  +    
  +<exception class="org.jboss.seam.security.NotLoggedInException">
  +   <redirect view-id="/login.xhtml">
  +      <message>Please log in first</message>
  +   </redirect>
  +</exception>]]></programlisting>
  +
  +            <para>
  +               And, for JSF:
  +            </para>
  +    
  +            <programlisting><![CDATA[<exception class="javax.faces.application.ViewExpiredException">
  +   <redirect view-id="/error.xhtml">
  +      <message>Your session has timed out, please try again</message>
  +   </redirect>
  +</exception>]]></programlisting>
  +
  +            <para>
  +                A <literal>ViewExpiredException</literal> occurs if the user posts back
  +                to a page once their session has expired.  <literal>no-conversation-view-id</literal>
  +                and <literal>conversation-required</literal> give you finer grained control over
  +                session expiration if you are inside a conversation.
  +            </para>
  +        </sect2>
  +
       </sect1>
       
   </chapter>
  \ No newline at end of file
  
  
  



More information about the jboss-cvs-commits mailing list