what is the trouble?...all looks good to me 
 
do you need to include:
  classtype="org.apache.struts.tiles.beans.SimpleMenuItem" ?
 

________________________________

From: Java Programmer [mailto:[EMAIL PROTECTED]
Sent: Thu 23/11/2006 12:07 AM
To: user@struts.apache.org
Subject: Tiles & menus



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]



**********************************************************************
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**********************************************************************

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

Reply via email to