• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
I am not a spy. Definitely. Definitely not a spy. Not me. No way. But this tiny ad ...
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic