Re: unexpected behavior with a checkbox.

2008-01-10 Thread David Durham, Jr.
> > 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

Re: unexpected behavior with a checkbox.

2008-01-09 Thread Dave Newton
--- "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 >

Re: unexpected behavior with a checkbox.

2008-01-03 Thread David Durham, Jr.
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

Re: unexpected behavior with a checkbox.

2008-01-02 Thread ravi_eze
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

Re: unexpected behavior with a checkbox.

2008-01-02 Thread David Durham, Jr.
> > > >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

Re: unexpected behavior with a checkbox.

2008-01-02 Thread Peter L. Berghold
-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

Re: unexpected behavior with a checkbox.

2008-01-02 Thread David Durham, Jr.
> 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