Once again, please ask questions about Struts on the Struts mailing
lists, rather than here.

--
Martin Cooper


On 7/23/05, Luca Passani <[EMAIL PROTECTED]> wrote:
> 
> Hello, I would love to hear about some taglib theory here.
> 
> My understanding is that, when creating a new tag, I can inherit from
> either TagSupport or BodyTagSupport
> depending on whether I need to manipulate  the tag content or not.
> For this reason, most of my tags (WALL library) inherit from TagSupport
> with the exception of one (which inherits from BodyTag).
> Looking at the code for the Struts html tag-lib, I see that most tag
> inherit from BaseHandlerTag (which looks
> totally reasonable to me), which, in turn, inherits from BodyTagSupport,
> even for tags that have no particular reason to do so,.
> 
> in fact, in moost cases, doAfterBody() ends up doing domething as simple as,
> 
>  if (bodyContent != null) {
>             String value = bodyContent.getString().trim();
>             if (value.length() > 0) {
>                 text = value;
>             }
>         }
> 
> i..e,  just comsmetic for the returned source markup.
> 
> My question is, in general, what is the rationale for inheriting from
> BodyTagSupport everywhere?
> what is the performance hit when inheriting from BodyTagSupport as
> compared to TagSupport?
> 
> Thank you
> 
> Luca
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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

Reply via email to