| Author |
Using Tiles Attributes with Custom Tags.
|
Nick Larson
Greenhorn
Joined: Apr 21, 2004
Posts: 7
|
|
Hello All.. I am trying to use on of my tiles as dynamic content. I guess the custom tag doesn't like the brackets, but am I am more interested if there is a "trick" to get this to work. tiles-def.xml =============== <definition name="myPage" path="/tiles/baseLayout.jsp" > <put name="title" value="Main Title" /> <put name="menuTitle" value="Menu Title" /> </definition> baseLayout.jsp =============== <%@ taglib uri="/tags/struts-tiles" prefix="tiles" %> <%@ taglib uri="/MenuTag" prefix="mt" %> <html> <head> <title><tiles:getAsString name="title"/></title> </head> <body> <mt:menu title=<tiles:getAsString name="menuTitle"/> /> </body> </html>
|
 |
Nick Larson
Greenhorn
Joined: Apr 21, 2004
Posts: 7
|
|
I have tried something like this in baseLayout.jsp as well. I thought this would work, but I must be missing something. <tiles:useAttribute id="lMenuTitle" name="menuTitle" /> <mt:menu title="<%lMenuTitle%>" />
|
 |
Nick Larson
Greenhorn
Joined: Apr 21, 2004
Posts: 7
|
|
Ok...5 more minutes, had it figured out.... I was close with my last try.... Here is what I did... <tiles:useAttribute className="String" id="lMenuTitle" name="menuTitle" /> <mt:menu title="<%=lMenuTitle%>" />
|
 |
 |
|
|
subject: Using Tiles Attributes with Custom Tags.
|
|
|