commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Nichols <>
Subject [jelly] Using BeanTagLibrary for "action" tags
Date Mon, 24 Feb 2003 17:47:33 GMT

Is it possible to use BeanTagLibrary and have the top-level tags - i.e. 
those registered with registerBean() - actually DO something? The plumbing 
used in
works a treat, and requires a minimal amount of glue (most of which can be 
abstracted into super classes - great.)

However, though this is useful for "data assembly" I want the top-level tag 
to perform an action - which I'm currently doing using a standard 
TagLibrary impl and TagSupport-derived tag classes. With the existing 
("imperative") code, doTag() is invoked for the top-level, registered, tag, 
so I can take appropriate actions. How do I do this using the plumbing of 

I'm trying to get the following -
   <input1><file name="reggae.xml"/></input1>
   <input2><url value=""/></input2>

The inputX, url and file classes are just data wrappers, BeanTagLibrary 
handles this very elegantly if I have
     registerBean (sync, Sync.class) in  MyTagLibrary ctor. I want to 
invoke the "sync" processing on the collected data once the input1 and 
input2 elements have been parsed. Is this possible?

The refactoring has made for a cleaner architecture IMHO - worth the pain, 
for me at least.



View raw message