| Author |
DataTable row selection
|
Peter Braun
Ranch Hand
Joined: Feb 09, 2005
Posts: 57
|
|
Hi! I have a simple problem but I'm a beginner in JSF so I couldn't solve it. I have a DataTable with a link (or a button) on each row. If the user clicks on it, I would like to show the details of the selected row on an other page. My problem is I can't pass the id of the row to an action. Actually I don't know how to do that, or what is the good solution. I know it must be a very basic problem, but I didn't find any examples or tutorials which show how to do this particular thing. Thanks in advance, Peter
|
 |
Leonardo Rafaeli
Ranch Hand
Joined: Dec 12, 2005
Posts: 58
|
|
hey peter take a look in this thread http://www.coderanch.com/t/213290/JSF/java/Why-JSF-calls-method-parameter This example shows exactly how you can pass the rowIndex or whatever you want to you action/actionListener method
|
SCJP 1.4, SCWCD 1.4, SCBCD 5, OCUP, SCEA 5 (I), Oracle SOA Implementation Specialist, IBM Websphere Lombardi 7.1 Fundamentals
Blog: [url]http://www.leozin.com.br/blog[/url]
|
 |
Peter Braun
Ranch Hand
Joined: Feb 09, 2005
Posts: 57
|
|
Thanks for your help! Recently have I found some good example related to table row selection in this book: JavaServer Faces By Hans Bergsten: Chapter 10 / Processing Row-Specific Events http://www.oreilly.com/catalog/jsvrfaces/toc.html It helped me, so I thought it's worth considering. Thanks again. Peter
|
 |
Ian Dunsirn
Ranch Hand
Joined: May 25, 2006
Posts: 36
|
|
|
I am trying to do something similar to the original poster. How would you apply the information in Leonardo's response to get the original poster's intended results?
|
 |
 |
|
|
subject: DataTable row selection
|
|
|