struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cedric Dumoulin <>
Subject Re: tiles as attribute's value - is it possible ?
Date Fri, 12 Jul 2002 08:10:05 GMT


  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
  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,


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

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message