Hi, i'm trying to build a menu template using tiles, in my tiles.xml file I have:

<definition name="leftMenu" extends="generalMenu" template="/pages/components/linkmenu.jsp">
   <put-list-attribute name="leftMenuLinks">
       <item value="List Users" link="??" />
       <item value="New User" link="??" />
       <item value="Datatable Test" link="??" />
   </put-list-attribute>
</definition>


The problem is in the link attribut, I want to insert a '<s:url action=""/>' or '<s:url value=""/>' markup but I don't how to do.

In fact I want to transform this:
<table class="linkmenu">
       <tr>
               <th class="linkmenu">Title</th>
       </tr>
       <tr>
               <td><a href="<s:url action="list" />">list users</a></td>
       </tr>
       <tr>
<td><a href="<s:url value="/pages/index.jsp" />">new user</a></td>
       </tr>
       <tr>
<td><a href="<s:url value="/pages/index.jsp" />">test datatable</a></td>
       </tr>
</table>

with that :

<table class="linkmenu">
       <tr>
               <th class="linkmenu">Title</th>
       </tr>

       <tiles:importAttribute name="leftMenuLinks" />
       <c:forEach var="item" items="${leftMenuLinks}">
               <tr>
<td><a href="${item.link}" />">${item.value}</a></td>
               </tr>
       </c:forEach>
</table>

So, how can I do that ?

Thanks.

Baptiste GAILLARD.

Reply via email to