You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by er...@oyak.com.tr on 2002/08/13 09:21:57 UTC

problem with radio button in iteration

Dear struts people;
I have a problem with the radio button usage in struts. Think of a list in
the jsp, you can delete a row of the list by selecting the radio button of
that row and then press the delete button. In order to do this, there is an
attribute in the action form having the same name as the radio button in
jsp with its getter and setters. What I want to perform is to give the
value of the same attribute of the DTO to the attribute of the form when a
radio button is selected in the iteration so that I can use the id
attribute (having the id of the DTO to be deleted) of the form to carry out
the delete operation. When the jsp is displayed, the radio button values
are seen correct  in the source.But when I select a radio, the value of the
id attribute of the form is not seen when I print it at the console.Is
there a way to do this exactly? If any one helps me out I will be very
glad...thanx in advance.  waiting for any kindz of knowledge..



<logic:iterate id='someDTO' property='someArrayList'  name='someForm' type
='com.oyak.uhy.uye.dto.SomeDTO'>
<tr>
<td>
<bean:define id="id1" name="someDTO" property="id" toScope="request"/>
<html:radio  property = "id"value="<%= String.valueOf(id1) %>" />
</td>
<td>
<bean:write name='someDTO' property='var1'/>&nbsp;&nbsp;
</td>
<td>
<bean:write name='someDTO' property='var2'/>&nbsp;&nbsp;
</td>
<td>
</logic:iterate>



Erkan Osmanagaoglu


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>