tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xbranko <xbra...@netscape.net>
Subject how to create menues with tiles2?
Date Fri, 27 Jun 2008 21:15:58 GMT

Following the example at the 
http://tiles.apache.org/tutorial/advanced/menu.html tutorial page  I am not
getting the menu rendered. There is no exception, and instead of the menu, I
get the iterator control variable displayed.

tiles-def.xml:
  <definition name="menu" template="/Menu.jsp">
    <put-list-attribute name="menu.Attributes">
      <item value="Home page" link="menu.do" />
      <item value="News" link="news.do" />
    </put-list-attribute>
  </definition>

  <definition name="main" template="/main.jsp">
	  <put-attribute name="mymenu"    value="menu" />
  </definition>

Menu.jsp:
<%@taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<div align="center">
  <tiles:importAttribute name="menu.Attributes"/>
    <c:forEach var="item" items="${menu.Attributes}">
      &lt;a href="${item.link}"&gt;${item.value}&lt;/a&gt; |
    </c:forEach>
</div> 

What gets rendered on the page:
http://localhost:8080/$%7Bitem.link%7D ${item.value}  |

Why is this? What am I doing wrong or not setting up correctly?
This is with tiles 2.0.6

Many thanks,
Branko
-- 
View this message in context: http://www.nabble.com/how-to-create-menues-with-tiles2--tp18163991p18163991.html
Sent from the tiles users mailing list archive at Nabble.com.


Mime
View raw message