You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Laurie Harper <la...@holoweb.net> on 2005/12/01 00:02:40 UTC

Re: checkbox for nested collection

Per Jørgen Walstrøm wrote:
> hello,
> I have the following code in my jsp:
> 
> <nested:iterate id="sectionComponent" property="geSectionComponents">
>   <nested:checkbox property="restrictive"/>
> </nested:iterate>
> 
> my Collection geSectionComponents contains objects of type GeSectionComponent
> 
> GeSectionComponent.java (an auto-generated Hibernate POJO), contains the following field (with getter and setter):
> private Boolean restrictive;
> 
> How do I go about to make sure Struts detects when I uncheck a checkbox? I am aware of that I should set all corresponding boolean properties to false in the reset()-method, but in this case I do not have any direct access to those properties.
> 
> any suggestions?

What do you mean you don't have any direct access to those properties? 
You must be creating a reference to that object (or retrieving one 
through Hibernate) somewhere in your code. Assuming you're storing the 
POJO in your form bean as part of pre-population, you can then access it 
in your reset() method.

L.




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