Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tiles doesn't render one of includes

 
intenter
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.
I've got very strange problem in Tiles. All worked fine until I added one more page into definition. I added "contextMenu" line.

Here are my view definitions:
<definition name="template" page="/WEB-INF/jsp/template.jsp">
<put name="body" value="/WEB-INF/jsp/empty.jsp" type="page"/>
<put name="mainMenuIndex" value="0"/>
<put name="userMenuIndex" value="0"/>
<put name="contextMenu" value="/WEB-INF/empty.jsp" type="page"/>
<put name="contextMenuIndex" value="0"/>
<put name="script" value=""/>
<put name="onLoadScript" value=""/>
</definition>

<definition name="feeds.list" extends="template">
<put name="pageTitleKey" value="pages.feeds.list.title"/>
<put name="body" value="/WEB-INF/jsp/feeds/feeds.jsp" type="page"/>
<put name="contextMenu" value="/WEB-INF/jsp/feeds/contexMenu.jsp" type="page"/>
<put name="userMenuIndex" value="2"/>
<put name="contextMenuIndex" value="0"/>
</definition>

Here is template.jsp:
.....
<div id="side-bar">
<div>
<jsp:include page="userMenu.jsp"/>
</div>
<tiles:insert name="contextMenu"/>
</div>
.........

All other pages work fine. They display empty.jsp at proper place. But when "feeds.list" view renders, Tiles display nothing instead of "contextMenu.jsp".
If i put source of "contextMenu.jsp" into "template.jsp" - all works fine, but if I try to use <tiles:insert>, nothing displays.

Please, show me my mistake. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic