Meaningless Drivel is fun!*
The moose likes JSF and the fly likes JSF request parameters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF request parameters" Watch "JSF request parameters" New topic
Author

JSF request parameters

Pradyut Bhattacharya
Ranch Hand

Joined: Aug 12, 2004
Posts: 63
Hi
I want to get the value of a text field "textField1" in a Page1
Im able to forward to Page2 via a button but I want to retrieve the value of textfield in page2

The code i wrote in prerender function is: -
label1.setText(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("Page1.textField1"));

where label1 is a label in Page2
but I do not get any value in Label1.

Any Help

Thanks
Pradyut
http://pradyut.tk
India


Pradyut
http://pradyut.tk/
A. Dusi
Ranch Hand

Joined: Sep 27, 2004
Posts: 114
What is the scope of your backing bean for Page1? If it is in session scope, you can simply access the textfield in Page2 the same way you are accessing it on Page1.
If the scope is request and if you are using MyFaces implementation, check out the t:saveState tag on MyFaces Wiki page.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF request parameters
 
Similar Threads
JSF Filter prevent direct access certain page
linking jsp pages in a liferay portlet
variable carryover
Session ID
how to replace a value in I E from a pop up window without refreshing the parent page