Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Passing user defined objects as request parameter in JSF

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I have a list containing some user defined objects. I iterated the list and display in page.At the end of every row there is a command button. I want to sent each object in the list as a parameter. The following is the code I am using, it's not working .....

facultyList is a list in the class FacultyListAdminBean class. This list contains many objects of CpsFacultyListAdminVO.






Please Help. Thanks in advance.

[ March 20, 2008: Message edited by: Ingoba Ningthoujam ]
[ March 24, 2008: Message edited by: Ingoba Ningthoujam ]
 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you try a command link instead? It is easier.
But if you really really want a button....


http://forum.java.sun.com/thread.jspa?messageID=2374166&tstart=0
[ March 20, 2008: Message edited by: Bob Good ]
 
Ingoba Ningthoujam
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Bob.

But I made a mistake in my question. I am using commandLink not commandButton.
Usually I used to send the member of the object as a parameter but what I want is to send the USER DEFINED object itself as a parameter. So, can you please send me the sample code.

Please Help.
 
Ranch Hand
Posts: 1880
Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use dataTable and bind it with bean
http://www.javabeat.net/code/2007/09/jsf-h-datatable-h-selectbooleancheckbox/
[ March 23, 2008: Message edited by: Krishna Srinivasan ]
 
Ingoba Ningthoujam
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. But binding in Datatable we can use in that bean only. My requirement is to pass that value to another bean. On clicking on the link that I have mention in my code , a new pop up window will open and this page is associated with another bean.

please clarify more. Thanks in advance.
 
Bob Good
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The action listener for the command link can be a method in the other bean:

(a backing bean for the target page). Then just retrieve your parameter in the usual fashion:

[ March 25, 2008: Message edited by: Bob Good ]
 
Ingoba Ningthoujam
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much.
 
reply
    Bookmark Topic Watch Topic
  • New Topic