Re: webobjects-dev digest, Vol 1 #1239 - 13 msgs
Re: webobjects-dev digest, Vol 1 #1239 - 13 msgs
- Subject: Re: webobjects-dev digest, Vol 1 #1239 - 13 msgs
- From: Ismael Perdido <email@hidden>
- Date: Mon, 30 Aug 2004 22:16:59 +0200 (CEST)
Checkbox behavior is due to the HTML spec. A checkbox
value is only passed as an argument if it is checked.
This means you have to expect a possible null value
for the field. I sometimes find it more graceful to
use a radio button or even a pulldown for the sake of
processing values. Just my 2 bits on web
interfaces...
Ismael Jones
email@hidden
----------------------- previous message
------------------------
Cc: WebObjects (Group) <webobjects->
email@hidden>
From: Elizabeth Lynch <email@hidden>
Subject: Re: Weird CheckBox Bug ??
Date: Mon, 30 Aug 2004 11:34:54 +0100
To: Owen McKerrow <email@hidden>
Owen
> However if I unselected ALL the checkbox's that had
been selected and
> submit the page, the page reloads and nothing has
changed, they are
> still ticked. In fact in this case the
setAssSubCatSelected method
> doesn't even appear to be called, in that my "This
method is actually
> being called" System.out.println is not printed.
>
> Any ideas on why when all my checkboxes are
unchecked the method
> doesn't get called ?
>
When you have nothing but checkboxes within a form,
then when you
untick the final box the form has nothing to Submit -
and submitting an
empty form has no effect. You can fix this by adding
a dummy textfield
within your form so that your Submit has something to
actually submit.
Add a Textfield, keep it Static, give it content and a
name (eg
DummyText, DummyField) and make it Hidden.
There may be more elegant ways to deal with this, but
this is simple
and works fine for me.
Liz
----------------------- end previous message
------------------------
______________________________________________
Renovamos el Correo Yahoo!: !100 MB GRATIS!
Nuevos servicios, mas seguridad
http://correo.yahoo.es
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.