Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

selecting a row in s:iterator

 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am iterating rows for setting values in row elements...




In the UI after displaying these values I need to select any of the produced rows... In the above the rowid would be same for each row!

How to achieve it? This could have been in JS forum but usage of struts prompted me to be here ...
 
Tom Rispoli
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I've had to do this I used the status attribute in the iterator tag to give me a variable that holds the index that that iterator is at, then I append the value of that variable to the id for the row, so in your case, something like this:



Hope that answers your question.
 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If we need to write this whole thing in Javascript can we achieve that?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Achieve what? The original response provides the usual mechanism for identifying HTML elements.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic