Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Evaluating struts tags inside my own custom tags... (http://www.velocityreviews.com/forums/t132503-evaluating-struts-tags-inside-my-own-custom-tags.html)

A. Brinkmann 04-13-2004 09:30 AM

Evaluating struts tags inside my own custom tags...
 
Hi,

I made a custom tag (extending TagSupport),
which looks like this:

<test:mytag key="foo"/>

And in the implementation of this tag, in doStartTag(),
I do the following:

out.write("<bean:message key=\""+key+"\"/>");

But well, the struts tag is just written in the output,
and not evaluated. In this case, I could just get the
resource in my implementation instead of using the struts
tag, but I want to encapsulate other struts tags in the
same way, and have them evaluated. Is that possible?

Thanks in advance,

A. Brinkmann.



Chris Smith 04-13-2004 03:09 PM

Re: Evaluating struts tags inside my own custom tags...
 
A. Brinkmann wrote:
> But well, the struts tag is just written in the output,
> and not evaluated. In this case, I could just get the
> resource in my implementation instead of using the struts
> tag, but I want to encapsulate other struts tags in the
> same way, and have them evaluated. Is that possible?


Not in a Java-based tag handler, no. If you're using JSP 2.0, though,
it's quite possible in a tag file.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

A. Brinkmann 04-16-2004 07:44 AM

Re: Evaluating struts tags inside my own custom tags...
 
> Not in a Java-based tag handler, no. If you're using JSP
> 2.0, though, it's quite possible in a tag file.


Thanks! I'm using JSP 2.0, I just didn't know about tag files. I tried it
and it works great.

A. Brinkmann.




All times are GMT. The time now is 12:24 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.