commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james_strac...@yahoo.co.uk>
Subject Re: [jelly] Configurable tags ?
Date Mon, 21 Oct 2002 11:21:47 GMT
Hi Paul

I don't quite understand what you mean by the ConfigurationTag. Could you
maybe give an example of it in use?

Incidentally I've recently made a minor change to the <j:setProperties> tag
so that you can now nest that inside a <j:useBean> tag or a JellySwing tag,
maybe inside some boolean logic, to configure the parent bean. So you could
do things like...

<swing:frame>
  ...
  <j:setProperties title="The title of the frame" visible="true"/>
  ...
</swing:frame>

Is that of any help?

James
-------
http://radio.weblogs.com/0112098/
----- Original Message -----
From: "Paul Libbrecht" <paul@activemath.org>
To: "Jakarta List" <commons-dev@jakarta.apache.org>
Sent: Sunday, October 20, 2002 12:45 AM
Subject: [jelly] Configurable tags ?


>
> 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>
>

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
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