• 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

dataTable that each row links to a different page that displays information related to selected row

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Saloon Keeper
Posts: 27752
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
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic