[jboss-user] [JBoss Seam] - Re: Request for feedback
norman.richards@jboss.com
do-not-reply at jboss.com
Sun Dec 17 17:56:07 EST 2006
I don't know how other people's taste in XML goes, but the following reads really well to me:
<page view-id="/getDocument.jsp">
| <on action="#{documentHome.get}">
| <redirect to-view-id="/editDocument.jsp" when="#{documentHome.document!=null}">
| <param name="documentId" value="#{documentHome.document.id}"/>
| </redirect>
|
| <redirect to-view-id="/404.jsp" when="#{documentHome.document==null}" />
| </on>
|
|
| <on action="#{logout.logout}">
| <redirect to-view-id="/login.jsp" />
| </on>
| </page>
Or, with explicit outcome declaration:
<page view-id="/getDocument.jsp">
| <on action="#{documentHome.get}">
| <outcome value="#{documentHome.document!=null}" />
|
| <redirect to-view-id="/editDocument.jsp" when-outcome="true">
| <param name="documentId" value="#{documentHome.document.id}"/>
| </redirect>
|
| <redirect to-view-id="/404.jsp" when-outcome="false" />
| </on>
|
| <on action="#{logout.logout}">
| <redirect view-id="/login.jsp" when-null-outcome="true" />
| </on>
| </on>
Although, I think it might be even better if outcome were just a variable:
| <redirect to-view-id="/editDocument.jsp" when="#{outcome==true}">
| ...
| <redirect to-view-id="/404.jsp" when="#{outcome==null}">
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994525#3994525
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994525
More information about the jboss-user
mailing list