cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Widget states: let's do it (was Re: CForms making widgets invisible)
Date Wed, 22 Sep 2004 14:05:30 GMT
Claudius Spellmann wrote:

> Hi,
> I've created a patch to set a visibilitystatus for widgets. This means 
> that all widgets can be set visible or invisible on a form when a form 
> is created or using flowscript.

This has already been discussed here: we need widget states. However, 
state isn't limited to visible/invisible. We also need states like 

AFAIR, the list of states we came up to was:
- active : the current behaviour
- disabled: the widget is displayed, but its value (or sub-widgets in 
the case of containers) isn't read from the request.
- hidden: the widget isn't displayed, and of course it's value isn't 
read from the request.

States should be inherited by child widgets, taking into account the 
following state priority:
  active < disabled < hidden.

That means that if a repeater is hidden, its children will be hidden 
also even if their own state is active or disabled.

We also need to be able to set an intial state in the form definition 
(default being "active"). I propose a common "state" attribute for this, 
available on all widget types, e.g.
<fd:repeater id="foo" state="hidden">

We've discussed this many times and it appears it is a real need now, so 
let's do it right now.

Are we ok with this definition?


Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }

View raw message