Invoking tags from other tags

D

diego.manilla

Hi. I would like to know how to invoke a tag handler from another
custom one. For example, if I have:

<myTags:eek:neTag>
bodyContent
</myTags:eek:neTag>

I would like to put some code on oneTag class to make the previous code
behave as if it were:

<myTags:eek:neTag>
<otherTags:anotherTag>
bodyContent
</otherTags:anotherTag>
</myTags:eek:neTag>

I have to enclose the contents of my layout JSPs within some pretty
complicated cache tags (its attributes are dynamic and pretty lengthy),
and I would like to make a custom tag to encapsulate the (ugly) cache
tag, so instead of:

<cacheTags:cache (lots of attributes here)>
bodyContent
</cacheTags:cache>

I would have

<myTags:tinyTag>
bodyContent
</myTags:tinyTag>

The first thing I thought of was a tag file, but those don't allow
scripting on their body (which I need), and I haven't found a way to
modify the JspFragment object (using SimpleTag API) nor the BodyContent
one (using classic tag handlers).

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,744
Latest member
CortneyMcK

Latest Threads

Top