I can see these mostly untested possibilities:

1. Set the "value" of the edit button to reflect the index value.

2. Implement a javascript event handler on each edit button, which will
set the value of a hidden field to the loop index.  When the request
parameters are processed, you'll know which index of the array to
reference.

3. Inside each "<tr>" tag in the loop, put a separate "<form>", containg
the data and the edit button.  That will give you the selected
information.  Unfortunately, the HTML spec forbids a "<form>" tag
directly inside the "<tr>" tag.  Fortunately, both Mozilla/Netscape and
IE support this, perhaps accidently, perhaps intentionally.

> -----Original Message-----
> From: Dinesh Samson J [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 19, 2002 10:34 AM
> To: [EMAIL PROTECTED]
> Subject: RE : struggling with indexed/repeating input fields
> 
> 
> 
> Ya, you got the problem.
> 
> I will not be submitting the form. Instead I will call another form or
> jsp along with the values of the selected row as parameters.
> 
> I do not know how to get just the selected row's data.
> 
> 
> regards,
>  
> Dinesh Samson J
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] 
> Sent: 19 November 2002 20:37
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: struggling with indexed/repeating input fields
> 
> can you please explain the problem preperly?
> 
> If u are showing the list using html:text and pressing 
> submitting button
> then 
> there is no reason why the values will not be passed over.But as u are
> on the 
> same form , all the rows will be submitted instead of just 
> the one from
> where 
> the button is pressed.
> So is this u r probvloem that u just want the data from 
> selected row but
> 
> getting all the data?ansd dont know how to get just the selected rows
> data?
> 
> -----Original Message-----
> From: dinesh.samson [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 19, 2002 5:16 PM
> To: struts-user
> Subject: RE: struggling with indexed/repeating input fields
> 
> 
> Greetings Kevin,
> 
> For me the iterate tag is working. But I have a problem.
> 
> My requirement is,
> 
> I will show a list, from which I will be selecting a particular detail
> and click on edit in the same row. This will take some of the 
> values in
> that row and pass it on to the next jsp/action.
> 
> I am unable to get it working.
> 
> My iterate tag is working with indexed property and the html generated
> also has items[i].name
> But I am unable to get the value of the item in the selected row. 
> 
> Can you tell me how to get them! 
> 
> Thanx in advance
> 
> regards,
>  
> Dinesh Samson J
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to