On 8/24/05, Laurie Harper <[EMAIL PROTECTED]> wrote:
> Lucas Bern wrote:
> > Hi guys...
> >
> > I need to do something like this:
> >
> > x = new SomeTag();
> >
> > x.setContext(this.getContext());
> >
> > x.doStarTag();
> >
> > x.DoBody();
> >
> > ...
> >
> > etc...
> >
> > I´m not sure the way i should do that, has anybody ben dealing wit this 
> > before??
> 
> Why would you want to instantiate / invoke a tag manually? If you're doing
> it to re-use functionality in one tag from another, you should probably
> look at either moving the shared functionality into a helper class or using
> inheritance.
<snip/>

Or think JSP 2.0, think tag files (can you, or are you bound to 1.2 or
lower?). 2.0 gives more than one programming models for tag impls, and
IMO, Java has only so much joy when it comes to tag composition. As a
bonus, you won't have to write out.println's or escape double quotes
in case you're rendering via an XML variant markup (or HTML).

Does this help any? [
http://wiki.apache.org/jakarta-taglibs/ReusableDialogComponents/Tutorials/Composition
]

-Rahul

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to