aspose file tools*
The moose likes JSF and the fly likes Passing Parameters with navigation rules Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Passing Parameters with navigation rules" Watch "Passing Parameters with navigation rules" New topic
Author

Passing Parameters with navigation rules

mike berg
Greenhorn

Joined: Oct 06, 2009
Posts: 1
I have an action method that generates a value that needs to be passed to the next page. The method in the end returns a String and is mapped as a navigation rule to the corresponding but during the method execution a value is generated. Normally I could store this in session and read it on the corresponding redirected page but the client I am working for is not allowing any kind of server side session to be used so I need to send it as a request parameters. Does anyone know how to do this?
Viswanath Tg
Greenhorn

Joined: Nov 27, 2007
Posts: 20
Use the following snippent to get the request object and then set the required information in request scope

HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext()
.getRequest();
request.setAttribute("userObject","VALUE");

Helping hands are better than praying lips
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Passing Parameters with navigation rules
 
Similar Threads
Session Attribute Values Fom JS
populating a field automatically
EL in views and outcomes?
Get the action value from a commandButton in a managed bean
Access managed bean from a servlet