File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Soft Skills this week in the Jobs Discussion 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