This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes dataTable onclick Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "dataTable onclick" Watch "dataTable onclick" New topic
Author

dataTable onclick

Paolo Pinkel
Ranch Hand

Joined: May 04, 2011
Posts: 35
Hey!

In a form, I have a dataTable and I have some inputFields that do not belong to the dataTable.

I'm looking for some "onclick" behavior: If the user clicks on a row, the values of that row should be made available in the inputField, preferably using ajax.

I'm using JSF 2 (MyFaces) with Tomahawk. I would prefer a solution that doesn't need additional libs.

Does anyone know if there is some way to achieve this?

Thank you!
Guy deLyonesse
Ranch Hand

Joined: Apr 12, 2011
Posts: 200

You could render the text in the data table fields as command links.
Paolo Pinkel
Ranch Hand

Joined: May 04, 2011
Posts: 35
Thank you, that did the trick!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dataTable onclick
 
Similar Threads
highlight the selected row from datatable to submit using "submit" button.(No radion buttons )
Specifying row classes in dataTables
How to show a panel or any other GUI object in OpenFaces 3.00 Datatable upon row selection?
how to get index value of datatable
JS onclick to show data of the selected row in a new browser window.