Hello,
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" />
        </putList>
</definition>
- part of jsp *tile*
<tiles:importAttribute name="menu" />

<c:forEach items="${menu}" var="menuItem">
        <a href="<c:out value="${menuItem.link}" />"><c:out
value="${menuItem.value}" /></a>
</c:forEach>
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,
Adr

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to