You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dan Allen <da...@mojavelinux.com> on 2003/04/29 07:25:57 UTC
logic with tiles
At times I want to do logic with my tile params. For instance, on a
page I might have a tiles param for "quote", so my tiles def might
have
<tiles:put name="quote" value=""/>
I would like to do something like
<c:set var="quote"><tiles:getAsString name="quote" ignore="true"/></c:set>
<c:if test="${not empty quote}">
<tiles:getAsString name="quote"/>
</c:if>
However, there seems to be no way to get the tiles attributes in the
jstl tags, so it requires the extra step of bringing the tile
parameter into a variable. I know I could use
<tiles:importAttribute name="quote" ignore="true"/>
but then I would not be setting a page variable if it doesn't exist,
which is why I wrap the call in the c:set
Is there an easier way to do this I am not seeing?
Dan
--
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Daniel Allen, <da...@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
umm... i guess this is my signature. 8-}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org