Reputation: 127
I'm trying to set my tiles in a way that I have an inner template in a template. I can load the inner template but I can't load the innermost jsp files (accountContent). Below are my files snippet. The accountContent attribute jsps are just simple text
tiles.xml
<definition name="main-layout" template="/WEB-INF/jsp/cmsPages/main-layout.jsp">
<put-attribute name="content" value="" />
</definition>
<definition name="main-account" extends="main-layout">
<put-attribute name="content" value="/WEB-INF/jsp/cmsPages/main-account.jsp" />
<put-attribute name="accountContent" value=""/>
</definition>
<definition name="main-account-siteList" extends="main-account">
<put-attribute name="accountContent" value="/WEB-INF/jsp/cmsPages/main-account-siteList.jsp" />
</definition>
<definition name="main-account-userList" extends="main-layout">
<put-attribute name="content" value="/WEB-INF/jsp/cmsPages/main-account.jsp" />
<put-attribute name="accountContent" value="/WEB-INF/jsp/cmsPages/main-account-userList.jsp" />
</definition>
main-layout.jsp
<s:div class="inner">
<tiles:insertAttribute name="content" ignore="true" />
</s:div>
main-account.jsp
<s:div class="account-content">
aaaaa
<tiles:insertAttribute name="accountContent" ignore="true" />
</s:div>
Eveytime I try to call the struts action for the tiles the accountContent is just empty. What am I doing wrong here?
EDIT: Additional notes. Tiles main-account-siteList and main-account-userList are the tiles that I'm calling. I'm trying them at the same time to test different setups
Edit2: added in main-account
Upvotes: 0
Views: 147