| Author |
Passing user defined objects as request parameter in JSF
|
Ingoba Ningthoujam
Ranch Hand
Joined: Dec 04, 2006
Posts: 90
|
|
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 ]
|
 |
Bob Good
Ranch Hand
Joined: Jan 09, 2008
Posts: 86
|
|
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
Joined: Dec 04, 2006
Posts: 90
|
|
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.
|
 |
Krishna Srinivasan
Ranch Hand
Joined: Jul 28, 2003
Posts: 1803
|
|
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 ]
|
Krishna Srinivasan
OCAJP Mock Questions
|
 |
Ingoba Ningthoujam
Ranch Hand
Joined: Dec 04, 2006
Posts: 90
|
|
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
Joined: Jan 09, 2008
Posts: 86
|
|
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
Joined: Dec 04, 2006
Posts: 90
|
|
|
Thank you very much.
|
 |
 |
|
|
subject: Passing user defined objects as request parameter in JSF
|
|
|