Now, as I mentioned already [1], I started using the generator approach to form templates, using the implementation of "wt:" statements using JXMacro provided by Chris [2]. And this approach is very powerful, as it allows complex conditional form layout without requiring the introduction of yet-another-control-structure-markup in the "wt:" namespace.
Introducing the widget states would allow these conditions to be computed with the form's own state rather than using some separate flow values.
So, I propose the following changes to Cocoon forms:
- add a state to widgets (enabled/disabled/hidden).
Assuming this state will be available during binding, as well as in form... +1. But, this will require some kind of "wt:" control markup anyway... Given simple example:
<table><tr><td><wt:widget-label id="x"/></td><td><wt:widget id="x"/></td></tr></table>
There is a need to disable whole table, it's not enough to take out widget only.
- move to a generator approach.
+1.
Vadim
WDYT?
Sylvain [1] http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=108072698303323&w=2 [2] http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=107332516118153&w=2