struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Java Programmer" <>
Subject Tiles & menus
Date Wed, 22 Nov 2006 13:07:23 GMT
I have some troubles with finding examples of using SimpleMenuItem and
<item> tags within <definition>, so far I did menu like this:
- part of tiles-def.xml:
<definition name="aPage" path="/pages/TileExample1.jsp">
        <put name="title"  value="Another Title" />
        <put name="body"   value="aPage.body" />
       	<putList name="menu">
    		<item link="/link1.jsp" value="Link 1" />
    		<item link="/link2.jsp" value="Link 2" />
    		<item link="/link3.jsp" value="Link 3" />
- part of jsp *tile*
<tiles:importAttribute name="menu" />

<c:forEach items="${menu}" var="menuItem">
	<a href="<c:out value="${}" />"><c:out
value="${menuItem.value}" /></a>
So first I import attribute into jsp context, and further iterate
through it with jstl forEach / out tags. Is this good solution? Are
there any better for using SimpleMenuItem in JSP pages?

Best regards,

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

View raw message