Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dataTable onclick

 
Paolo Pinkel
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 200
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could render the text in the data table fields as command links.
 
Paolo Pinkel
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, that did the trick!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic