You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vinicius Caldeira Carvalho <vi...@squadra.com.br> on 2005/02/24 15:13:05 UTC

Help with checkboxes and nested

Hello there! I have a form with a nested object and I'm using struts 
<nested> tags to display it.
One of the properties of the nested pojo is a checkbox. Now, handling 
checkboxes with struts is already a pain, and I figured that nested 
checkboxes are even worse.

Here's the deal. If the user unchecks some of the checkboxes, as the 
browser doesn't send the value, it keeps the old checked value in the 
property of the pojo. How could I solve this? any ideas please?


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


Re: Help with checkboxes and nested

Posted by Marco Sindoni <ma...@gmail.com>.
I've found the same problem in the past. No solution found using
checkboxes...Solved using a combobox with "yes" and "no" value...Some
people I know said there's a Struts problem submitting checkboxes
within nested tags...honestly I admit I don't look for a better
solution ;)

Hope this help

Marco

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


Re: Help with checkboxes and nested

Posted by Hubert Rabago <hr...@gmail.com>.
What does your form look like?


On Thu, 24 Feb 2005 11:21:36 -0300, Vinicius Caldeira Carvalho
<vi...@squadra.com.br> wrote:
> Hubert Rabago wrote:
> 
> >In order to detect boxes that are unchecked, your form should set the
> >corresponding property's value to false in its reset() method.  See
> >http://struts.apache.org/userGuide/struts-html.html#checkbox .
> >
> >hth,
> >Hubert
> >
> >
> >On Thu, 24 Feb 2005 11:13:05 -0300, Vinicius Caldeira Carvalho
> ><vi...@squadra.com.br> wrote:
> >
> >
> >>Hello there! I have a form with a nested object and I'm using struts
> >><nested> tags to display it.
> >>One of the properties of the nested pojo is a checkbox. Now, handling
> >>checkboxes with struts is already a pain, and I figured that nested
> >>checkboxes are even worse.
> >>
> >>Here's the deal. If the user unchecks some of the checkboxes, as the
> >>browser doesn't send the value, it keeps the old checked value in the
> >>property of the pojo. How could I solve this? any ideas please?
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >>
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
> >
> >
> Well I guess you haven't read the question. This is a nested checkbox,
> in ordinary checkboxes I use reset with no problem, but how to do this
> in a nested component????
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

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


Re: Help with checkboxes and nested

Posted by Vinicius Caldeira Carvalho <vi...@squadra.com.br>.
Hubert Rabago wrote:

>In order to detect boxes that are unchecked, your form should set the
>corresponding property's value to false in its reset() method.  See
>http://struts.apache.org/userGuide/struts-html.html#checkbox .
>
>hth,
>Hubert
>
>
>On Thu, 24 Feb 2005 11:13:05 -0300, Vinicius Caldeira Carvalho
><vi...@squadra.com.br> wrote:
>  
>
>>Hello there! I have a form with a nested object and I'm using struts
>><nested> tags to display it.
>>One of the properties of the nested pojo is a checkbox. Now, handling
>>checkboxes with struts is already a pain, and I figured that nested
>>checkboxes are even worse.
>>
>>Here's the deal. If the user unchecks some of the checkboxes, as the
>>browser doesn't send the value, it keeps the old checked value in the
>>property of the pojo. How could I solve this? any ideas please?
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>  
>
Well I guess you haven't read the question. This is a nested checkbox, 
in ordinary checkboxes I use reset with no problem, but how to do this 
in a nested component????

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


Re: Help with checkboxes and nested

Posted by Hubert Rabago <hr...@gmail.com>.
In order to detect boxes that are unchecked, your form should set the
corresponding property's value to false in its reset() method.  See
http://struts.apache.org/userGuide/struts-html.html#checkbox .

hth,
Hubert


On Thu, 24 Feb 2005 11:13:05 -0300, Vinicius Caldeira Carvalho
<vi...@squadra.com.br> wrote:
> Hello there! I have a form with a nested object and I'm using struts
> <nested> tags to display it.
> One of the properties of the nested pojo is a checkbox. Now, handling
> checkboxes with struts is already a pain, and I figured that nested
> checkboxes are even worse.
> 
> Here's the deal. If the user unchecks some of the checkboxes, as the
> browser doesn't send the value, it keeps the old checked value in the
> property of the pojo. How could I solve this? any ideas please?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

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