Hello,
If you have access to the
<html:mytag ...> code, you can modify it to take the tiles' attribute name as
attribute, and retrieve the corresponding value from TilesContext. Check how
<tiles:getAsString > is implemented for examples (class GetAttributeTag.java).
If you don't want some Tiles code in your tag, use the classic tag way of life :
modify your tag to take the attribute name as input, and retrieve the value from the
page context.
Before using your tag, put the requested tiles' attribute in page context :
<tiles:importAtribute name="title /> <!-- put tiles attribute in page context -->
<html:mytag name="title"/> <!-- retrieve attribute from page context -->
Hope this help,
Cedric
Arik Levin ( Tikal ) wrote:
>
> Hi all.
>
> I have some tag which I want it to be like this:
>
> <html:mytag value="<tiles:getAsString
>name="title" />" />
>
>
> As I saw after some searching I saw that some of you
>out there did it like this:
>
> <tiles:useAttribute name="title"
>classname="java.lang.String" ignore="true"/>
> <html:mytag value="<%=title%>"/>
>
> Did somebody has manage to come up with a cleaner
>idea?
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>