This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes JSF and the fly likes how to use managed bean property in navigation rule tag of faces config. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "how to use managed bean property in navigation rule tag of faces config." Watch "how to use managed bean property in navigation rule tag of faces config." New topic
Author

how to use managed bean property in navigation rule tag of faces config.

roby george
Ranch Hand

Joined: Sep 08, 2010
Posts: 31
how to use managed bean property in navigation rule tag of faces config.
i am using JSF1.2.

<navigation-rule>
<from-view-id>/Reports.jsp</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/Reports.jsp</to-view-id>
</navigation-case>
</navigation-rule>

I have a menaged bean which has the scope session. How can i use that managed bean property in navigation rule
like

<navigation-rule>
<from-view-id>/Reports.jsp</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/Reports.jsp?username=${myBean.userName}</to-view-id>
</navigation-case>
</navigation-rule>
i want to add "username=${myBean.userName}"

Please suggest its urgent
Thanks in advance
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17144
    
  27

You cannot do that.

The "to-view-id" is exactly what its name says. It's a View ID, and NOT a URL. You can use it to navigate to JSF Views, but not to JSPs or servlets, and you cannot parameterize it.

To pass information from one JSF process to another, the recommend procedure is to use internal server-side variables. As far as it goes, sending out the user ID to the client and receiving it again - whether in URLs, cookies, or form contents - is an extremely high security risk.


An IDE is no substitute for an Intelligent Developer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to use managed bean property in navigation rule tag of faces config.
 
jQuery in Action, 3rd edition