cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Re: Dynamically changing labels, was Re: Woody + FlowScript : documentation on model
Date Wed, 28 Apr 2004 09:48:07 GMT
On Wed, 2004-04-28 at 08:05, Sylvain Wallez wrote:
> Bruno Dumon wrote:
> 
> >On Tue, 2004-04-27 at 18:32, Tim Larson wrote:
> >  
> >
> >>[Copying to the dev list for additional discussion]
> >>
> >>On Tue, Apr 27, 2004 at 05:53:54PM +0200, Bruno Dumon wrote:
> >>    
> >>
> >>>On Tue, 2004-04-27 at 16:48, laurent_rorive@marinepower.com wrote:
> >>>      
> >>>
> >>>>We can of course retrieve the widget, but can we change the label of
> >>>>the widget, the key of the i18n of the label, can we change the
> >>>>style,... ?
> >>>>        
> >>>>
> >><snip/>
> >>    
> >>
> >>>no, no and no, respectively
> >>>      
> >>>
> >><snip/>
> >>    
> >>
> >>>However, things like labels are not changeable on the widget instance
> >>>level. You're the first one to ask for it. Do you need it? What's your
> >>>use case?
> >>>      
> >>>
> >>I have seen this asked for before, but I do not remember if it was on
> >>this ml or on the IRC channel.  The current workaround is to use either
> >>an "output" or a "messages" widget in place of the label to gain full
> >>control.
> >>    
> >>
> >
> >Well if people need it we better make it possible. After all, it's
> >possible to change e.g. the selection list, so why shouldn't it be
> >possible to change (or rather "override") the label?
> >  
> >
> 
> Selection-list is used at the application level, whereas storing the 
> label in the definition is mostly a convenience (it's part of the 
> display data). Next, we will be asked to dynamically change the hint, 
> help, accesskey, etc.
> 
> IMO, this is going too far. If some people need changing labels, the 
> simplest way to do it is at the view level, i.e. in the template, 
> possibly relying on data passed from the flowscript, but out of the 
> form's responsibility.

I need to think more about this, but I agree with the basic point that
label and other display data is a concern of the display pipeline, and
that it should be handled over there. OTOH it could then also be said
that it should not be part of the form model at all. I know it's because
of convenience, but being able to modify the label (or styling
information for that matter) from within the flowscript could also be
called convenience :-)

If people start using output widgets to dynamically set the label, then
that's also far from optimal.

Anyhow, I'd need to understand better the usecases for doing such things
to think about the best approach.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Mime
View raw message