[jboss-user] [JBoss Seam] - Re: Why PAGE context variable = NULL
damnh
do-not-reply at jboss.com
Thu Dec 20 21:24:51 EST 2007
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
More information about the jboss-user
mailing list