You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mano Dasanayaka <ma...@mubasher.net> on 2008/03/04 10:23:31 UTC

Struts2 CheckBox tag inside an s:iterator

Hi All,

I have a jsp where we list down some dynamic checkboxes.
for this we use s:checkbox tag inside a s:iterator ,


<s:iterator value="packageList" id="entry" status="stat">

<s:checkbox
	
name="fullMarket" fieldValue="${entry.packageId}"
	
theme="simple" value="${fullMarket}" >


</s:checkbox>



</s:iterator>


in my action class I have a string[] named fullMarket and all the required
getters and setters are provided there. Everything happens successfully,
when we submit the form ,,.i.e fullMarket  array comes with the selected
id's. 

but as we try to pre populate this same set of checkboxes , I see all the
checkboxes  selected irrespective of the values I set in action class.

this.fullMarket =  new String[] {"3","4","5"};


Any one got an idea what's wrong with this implementation.,..,


Thanks In Advance

Regards,

Mano 



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