File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF request parameters" Watch "JSF request parameters" New topic

JSF request parameters

Pradyut Bhattacharya
Ranch Hand

Joined: Aug 12, 2004
Posts: 63
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: -

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

Any Help


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:
subject: JSF request parameters
It's not a secret anymore!