> > The issue is that an unchecked checkbox does not send a value when a
> > form is submitted, so:
>
> This depends on (a) whether or not we're talking about S2 and (b) if we are
> whether or not we're using an interceptor stack that includes the "checkbox"
> interceptor.
I just meant that an HTT
--- "David Durham, Jr." wrote:
> Peter L. Berghold wrote:
>> Where the trouble comes in is if the field is unchecked which I thought
>> would set the value of the Boolean to "false." It doesn't, it remains
>> as a true.
>>
>> How do I implement behavior where if the checkbox is unchecked it sets
>
On Jan 2, 2008 10:59 PM, ravi_eze <[EMAIL PROTECTED]> wrote:
>
> hi,
>
> the workaround works, but causes problems if the checkbox should be
> validated. More over the soln is based on assumptions that need not hold
> always.
Which solution are you saying is based on assumptions that need not
hold
hi,
the workaround works, but causes problems if the checkbox should be
validated. More over the soln is based on assumptions that need not hold
always. There are 2 possible soln for this in my view:
1. use checkbox interceptor
(http://struts.apache.org/2.x/docs/checkbox-interceptor.html). But i
> >
> >request.getParameter("myUncheckedCheckbox") == null
> >
>
> Oh.. yuck.. but thanks David for that work around. Tried it and it
> works for my purposes.
There are things that can be done to avoid to the ugly null check.
1. Don't initialize check-box fields. No initial values.
2. Don't
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David Durham, Jr. wrote:
>
>request.getParameter("myUncheckedCheckbox") == null
>
Oh.. yuck.. but thanks David for that work around. Tried it and it
works for my purposes.
-
Peter L. Berghold Unix Professional
[EMAIL
> Where the trouble comes in is if the field is unchecked which I thought
> would set the value of the Boolean to "false." It doesn't, it remains
> as a true.
>
> How do I implement behavior where if the checkbox is unchecked it sets
> the corresponding property of the form to false?
The issue is
7 matches
Mail list logo