• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
roby george
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic