I want to pass variable mode (or variable with type Object) from /list.xhtml 
page to /register.xhtml page, I used PAGE scope to pass.
@Stateful
  | @Name("listAction")
  | @Scope(SESSION)
  | @Restrict("#{identity.loggedIn}")
  | public class ListAction implements
  |             IListAction {
  | .........
  |     @In(required = false)
  |     @Out(required = false, scope = ScopeType.PAGE)
  |     private String mode;
  | 
  |     public void search() {
  |             mode = "searched";
  |             //get list to display list.xhtml
  |             ..................
  |     }
  | ..........
  | }

  | @Stateful
  | @Name("regAction")
  | @Restrict("#{identity.loggedIn}")
  | public class RegAction implements IRegAction {
  | 
  |     ...........
  |     @In(required = false)
  |     @Out(required = false, scope = ScopeType.PAGE)
  |     private String mode;
  | 
  |     public void init() {
  |             if ("searched".equals(mode)) {
  |                     ....
  |             } else {
  |                     ....
  |             }
  |     }
  | }
  | 
pages.xml

  | <page view-id="/list.xhtml" login-required="true">
  |     <navigation from-action="#{listAction.search}">
  |             <redirect view-id="/list.xhtml" />
  |     </navigation>
  |     <navigation from-action="#{regAction.init}">
  |             <begin-conversation flush-mode="manual" />
  |             <redirect view-id="/register.xhtml" />
  |     </navigation>
  | </page>
  | 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4114863
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to