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
tial value for check-box fields, and Struts > creates a new form object for each submission, the state of a > check-box is preserved within an ActionForm. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional command

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

unexpected behavior with a checkbox.

2008-01-01 Thread Peter L. Berghold
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi folks, I have a form that the values for each field is populated as a result of a database query. One of the fields on the form is rendered as a checkbox and the corresponding table column is a boolean. When I pull in a "true" value from the data