struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hans-Peter Petek" <pe...@mazda.at>
Subject html:checkbox entries are not disappering
Date Fri, 21 Apr 2006 11:59:05 GMT
Hello all,

following problem ...
I have a list of entries (arraylist) and I am able to check them (with a
checkbox).
I can check for example 3 of 5 entries and press the save button ... (some
action behind) ... and the 3 entries are checked -> all fine.

But, when I deselect a checkbox, press the button (i.e. submit), all the
previous checked checkboxes are still checked .. =?!?!? Every checkbox I
ever checked once still remains checked ...

Can anyone help me ...

ActionForm:
public class LecturerTeamMemberForm extends ActionForm {
	
private ArrayList teamlist;

+ getter / setter ...

jsp:
<logic:iterate id="teamlist" name="lecturerTeamMemberForm"
property="teamlist" indexId="index">
<tr class="marked">
	<td>&nbsp;<html:checkbox name="teamlist" property="assigned"
indexed="true"/>&nbsp;</td>
	<td width="100%" align="left">&nbsp;<bean:write name="teamlist"
property="fullname"/></td>
</tr>
</logic:iterate>

The output (request) shows only the assigned checkboxes .. is there an error
in the mapping of struts or do I miss something?

Output: e.g. checkbox 1 and 3 selected
teamlist[0].assigned -> on
teamlist[2].assigned -> on

No entry of [1] ...

But if I have selected entry 2 (index 1) once before, the checkbox is always
selected after submitting ... but there is no entry of "teamlist[1].assigned
-> on" in the request.

Help would be great, I think its just a small problem ...

kind regards,
HP




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message