[Bese-devel] Resetting checkboxes to unchecked?

Attila Lendvai attila.lendvai at gmail.com
Fri Aug 4 17:49:39 UTC 2006


On 8/4/06, Maciek Pasternacki <maciekp at japhy.fnord.org> wrote:
> Why in the world does (RENDER CHECKBOX-FIELD) method reset (VALUE
> FIELD) to NIL on the very beginning of the method?

silly browsers mark unchecked checkboxes to that they don't send their
request param.

this is a quick solution, but i'm planning to refactor select-field
and other fields, and using a hidden field for checkboxes is also
planned. then the clearing at render time will not happen.

> In program I work on I have a container with a menu which switches
> currently displayed components (think tabbed window).  When I open a
> form with checkboxes, some of which are initially set (as in
> (MAKE-INSTANCE 'CHECKBOX-FIELD :VALUE T)), then switch to other tab
> and then back to form, an already initialized component is (RENDER)ed
> again and all fields are made unchecked.  I locally commented out the
> (SETF (VALUE FIELD) NIL) line from form.lisp and it works, but I use
> checkboxes only in one, very specific place of program, and I'm not
> sure if it would break something I didn't think of; does this line
> have any effect besides this (IMHO buggy, or at least not conforming
> to The Rule Of Least Surprise) behaviour?  Is this intended?

currently yes (you can't uncheck the checkboxes otherwise), but it'll
go away eventually...

-- 
- attila

"- The truth is that I've been too considerate, and so became
unintentionally cruel...
 - I understand.
 - No, you don't understand! We don't speak the same language!"

Ingmar Bergman - Smultronstället (Wild Strawberries)


More information about the bese-devel mailing list