> -----Original Message-----
> From: Ricky Lee [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 07, 2004 7:58 PM
> To: [EMAIL PROTECTED]
> Subject: how to nest a taglib in another taglib?
>
>
> hi, thanks for reading..
>
> i have a problem about nest a taglib in another
> taglib, just like this, what should i do?
>
> the "attribute" in the page context.
>
> <forum:hasContent content="<c:out value="${attribute}"
> />"></forum:hasContent>

This is not legal JSP (or XML) syntax. You cannot use an element as the
value of an attribute.

> i know that has a way to do like this:
>
> <bean:define id="new_id" name="attribute"/>
> <forum:hasContent
> content="<=new_id.toString()>"></forum:hasContent>
>
> but there is another way to do it?

That depends on how the <forum:hasContent> tag is implemented. If that is
your own tag, and you are free to modify it, you could EL-enable that tag,
which would allow you to do:

    <forum:hasContent content="${attribute}"/>

A good example of how to EL-enable tags can be seen in the Struts-EL tag
library, the source code for which is available here:

http://cvs.apache.org/viewcvs.cgi/jakarta-struts/contrib/struts-el/

On the other hand, if the <forum:hasContent> tag is not under your control,
then you're probably stuck with providing a scripting expression (rtexpr),
which would look just like the example you give above.

--
Martin Cooper


> please help me....thanks!
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Small Business $15K Web Design Giveaway
> http://promotions.yahoo.com/design_giveaway/
>
> ---------------------------------------------------------------------
> 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