[jboss-user] [JBoss Seam] - Re: Wildcard for pages action

mmichalek do-not-reply at jboss.com
Fri Jan 11 10:47:35 EST 2008


There's nothing wrong with that.  

However, it's not possible for me to use from-action as defined by Seam because most of my actions are being passed into facelet components as strings.  Inside the facelet component, I execute the action at the right time:


  | action="#{componentUtils.invokeAction(action)}"
  | 

This causes a problem with navigation because all of the action expressions look the same!

Also, we are designing our actions to be very granular and only expose one execute() method.  Action.exeucte() either returns NULL (failure) or it's component name (success).  (This seems a lot more simple than asking developers to return different arbitrary outcomes). When an action succeeds and returns it's component name, I will want to be able to conditionally navigate based on the state of the system.

For example:


  |   <navigation from-action="searchAction">
  |     <rule if="#{searchManager.searchResults.size == 1}">
  |       <redirect view-id="/showRecord.xhtml" />
  |     </rule>
  |     <rule if="#{searchManager.searchResults.size > 1}">
  |       <redirect view-id="/SearchResults.xhtml" />
  |     </rule>
  |   </navigation>
  | 

Let me know what you think of all of this and if you see any inherent problems with these approaches.

Thanks,
Mark

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119116#4119116

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119116



More information about the jboss-user mailing list