You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sloan Seaman <sl...@sgi.net> on 2003/03/14 17:05:26 UTC
Tile variable in a custom tag
Is there any way to get a variable passed to a tile into a custom tag within
that tile?
Example:
I pass to the tile:
<tiles:put name="OBJECT_NAME" value="node"/>
and then I want to so something like:
<pantryLoading:getBarcodeTree name="${OBJECT_NAME}" property="nodeList"
scope="session"/>
--
Sloan
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Tile variable in a custom tag
Posted by Cedric Dumoulin <ce...@lifl.fr>.
Import the tile attribute in one of the jsp scope:
<tiles.importAttribute name="OBJECT_NAME" />
Then, you can use it in your tag as el expression.
If you need to use it as java variable, use <tiles:useAttribute
name="..."/>
Check the tag syntax to know more ...
Cedric
Sloan Seaman wrote:
>Is there any way to get a variable passed to a tile into a custom tag within
>that tile?
>
>Example:
>I pass to the tile:
> <tiles:put name="OBJECT_NAME" value="node"/>
>
>and then I want to so something like:
>
><pantryLoading:getBarcodeTree name="${OBJECT_NAME}" property="nodeList"
>scope="session"/>
>
>--
>Sloan
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org