| 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: 14572
|
|
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.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
|
|
subject: how to use managed bean property in navigation rule tag of faces config.
|
|
|