commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Libbrecht <p...@activemath.org>
Subject [jelly] Configurable tags ?
Date Sat, 19 Oct 2002 23:45:44 GMT

Hi,

While building a user-interface in jelly, I came accross the classical 
difficulty of contextualizing (i.e. basically "scoping") a configuration.

A simple example is a special subclass of table I made which requires 
several init parameters. These parameters can, of course be given as 
attributes (even if they are not strings, thanks to the ${x} luxury) but 
that may become too verbose after some time.

As I am building user-interfaces, the ui component hierarchy would also 
be an approach, having, say, one of the parent components implement an 
interface that could provide to this child component a configuration 
object. However, as in jelly the component addition is made after all 
setters are invoked, this may be somewhat late (and reading such a 
configuration could only be performed relatively late, for example in 
addNotify() which would have to wait for its parent's addNotify() being 
called... or worse, in the first paint()).

I was wondering, however, if a notion of "ConfigurableTag" would not 
make sense. If included as a child of a "configuration" tag, that tag 
would, if the bean it describes implements a "Configurable" interface 
(or Contextualizable as in Avalan Framework?), call the beans' configure 
(contextualize) method with the confiration tag's bean as argument.

The advantage would clearly be that configuration is controlled from 
within the Jelly source which is a rather clean way.

Basically I'm hitting a simple fact... beans created by jelly-tags don't 
know that they are done by tags, as such... can't climb a hierarchy... 
Fixing that problem would also give access (maybe dirtily?) to many 
other things I believe.

Thanks for any ideas !

Paul


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message