my dog learned polymorphism
The moose likes Struts and the fly likes Selecting current row. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Selecting current row." Watch "Selecting current row." New topic

Selecting current row.

raka oscr

Joined: Mar 02, 2013
Posts: 26
Am using struts 1.3(myeclipse 6.0.1), this is my scenario,

I have a html table, I am filling the data using logic iterate tag, In that table i have a checkbox, if I check the check box, I want to get the current row detail.(Check box is s database field). How can i do this please guide me.
Saif Asif
Ranch Hand

Joined: Aug 11, 2011
Posts: 440

Raka ,

How about assigning a particular ID to the checkbox tag while you are iterating over it . Then on click functionality , you can get the ID of the checkbox that fired the click event , and in this way you can get the ID of the row which the user cliked.

Muhammad Saif Asif Mirza
raka oscr

Joined: Mar 02, 2013
Posts: 26
Thank you saif for your reply.
Still am not getting clear cut idea. I am very new to the environment. Please show me the way to achieve my need. I am helpless.

this what i have

note : putvalonclick() in this script method i can only show alert message. other than else i didnt know. how to proceed it further

Ankit Dan
Ranch Hand

Joined: Aug 31, 2012
Posts: 47

you can use something like this

I agree. Here's the link:
subject: Selecting current row.
It's not a secret anymore!