Mike emailed me this idea last night, and I think it's the best yet. Brilliant solution, Mike. Lukas "Mike Jasnowski" wrote in message news:MLEMLKNPCAGCLECPELMICEKHEGAA.mjasnows@bea.com... > Going from your example, I'm not sure why you even need to subclass a Struts > tag to get the output you described. You should be able to code something > like this on your JSP: > > > > > > > The tag handling flow would look like (similar to what you proposed > earlier): > > myTag.doStartTag(); > > pageContext.getOut().println("
"); > > *include output of body of custom tag here, which might be Struts tags > which are invoked. > > myTag.doEndTag(); > > pageContext.getOut().println("
"); > > > Which would evaluate to > > > > > > >
> >
> > All this w/o changing or subclassing a Struts tag, the only Custom tag work > is myTag. > > HTH, > Mike > > -----Original Message----- > From: Lukas Bradley [mailto:lukas@somnia.com] > Sent: Sunday, October 26, 2003 7:34 PM > To: struts-user@jakarta.apache.org > Cc: taglibs-user@jakarta.apache.org > Subject: Tags creating Tags > > > Hi all, > > Maybe I'm just tired, but the answer to this is not to be found. I could me > making this harder than it is, or something might be right in front of me, > and I don't see it. > > What I want is a custom tag that creates other custom tags. Here is a > simple example: > > > > Should produce something like this: > > > > > >
English
> > Which should then evaluate to: > > > > > >
English
class="FormField">
> > I've thought about trying to extend BodyTagSupport, return > EVAL_BODY_BUFFERED in doStartTag(), modify the bodyContent in doAfterBody(), > then return EVAL_PAGE() in doEndTag(). However, BodyContent has a protected > constructor, and no way to set its content. > > I want to maintain the functionality gained from Struts-like custom tags, > while extracting the creation of them in a super-duper momma tag. Any help? > > Lukas > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: struts-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: taglibs-user-help@jakarta.apache.org