cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Larson <>
Subject Re: [cforms] discussing the scratchpad (was Re: [WIKI-UPDATE] SandBox WoodyScratchpad Mon Mar 29 21:00:04 2004)
Date Thu, 01 Apr 2004 05:32:48 GMT
On Wed, Mar 31, 2004 at 12:38:44PM +0200, Marc Portier wrote:
> Sylvain Wallez wrote:
> >Marc Portier wrote:
> >>>Example:
> >>>
> >>><wd:choice id="some-id">
> >>> <wd:field id="field-A".../>
> >>> <wd:case id="case-0" expr="case-1-expression">
> >>>   <wd:ref id="field-A"/>
> >>> </wd:case>
> >>></wd:choice>

We could think of defining widgets inside a case as being merely
a syntactic shorthand for defining these widgets directly in the
choice and then referencing them into that case. This shortcut
may only be used on widgets which are only used by one case.

In other words, do not think of cases as widgets or containers,
but only as parts of the control structure syntax. This removes
the problem of having two reference paths to a widget.

> >>hm, I think Tim and I were still thinking about not having the choice 
> >>actually contain it's widgets... (I have to say I'm still doubthing, 
> >>but don't see it yet)

The motivation behind this was to ease the process of evolving a
simple widget or collection of widgets into a choice of widgets.
If the widgets listed "in" the choice are referenced by widget-id
rather than by choice-id.widget-id then the existing templates
and bindings could continue to work unmodified to ease the
incremental process of development.

Besides making the implementation of choice more complicated,
this plan may not work out anyway. I will be examining use cases
tomorrow to see if there is actually any merit in this design,
but wanted to at least let you know the motivations right now
since we have a such a big timezone difference between when your
day starts and when mine does.

--Tim Larson

View raw message