| Author |
dataTable that each row links to a different page that displays information related to selected row
|
Elico Av
Greenhorn
Joined: Dec 19, 2010
Posts: 6
|
|
Hi All,
I am looking for a way to achieve page navigation on request scope to display information on user.
I want to display on one page (backing bean 'BeanA' - page request) - this page displays a list of users (their name and email and a link row), I want that when clicking on a link a new page opens that has it's own bean (BeanB - request scope) and to tell this bean that user_id X was selected - something similar to /user.jsp?userid=X
If I register the bean (BeanB) on session scope I can always set the user id and then return the action string that navigates to my page.
The problem starts when the bean is a page request.
Assume that each link on each row return the action string that navigates to the other page,how can I forward the user-id parameter?
I am breaking my head with this, and currently I made it old fashion, I am using a link with the parameter in the query string, and then I read it from the request on the constructor of BeanB - but I would like to use the h:commandLink and the JSF navigation.
Thanks in advance for your kind answers.
Best Regards,
Elico.
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14487
|
|
Welcome to the JavaRanch, Elico!
I can't stand apps that pop up new windows myself, so I don't have a lot of practice doing this, and for simpler apps, there's no need to provide a parameter, since the commandLink already can tell which item you wanted based on what row in the table you selected. However, what I think you want is to place an <f:param> sub-element under the commandLink.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
|
|
subject: dataTable that each row links to a different page that displays information related to selected row
|
|
|