开发具有Tiles struts2技术的Web应用程序。问题是当我每次整页加载时都会导航页面。所以每次都会加载菜单和页眉。我认为瓷砖会解决这个问题..但仍然是每个导航的加载整页。 我的瓷砖:
<tiles-definitions>
<definition name="mainTemplate" template="/pages/template/mainTemplate.jsp">
<put-attribute name="title" value="Title" />
<put-attribute name="header" value="/pages/base/header.jsp" />
<put-attribute name="menu" value="/pages/base/menu.jsp" />
<put-attribute name="body" value="/pages/base/defaultHome.jsp" />
<put-attribute name="footer" value="/pages/base/footer.jsp" />
</definition>
<definition name="atOrganisationTemplate" extends="mainTemplate">
<put-attribute name="title" value="Organisation" />
<put-attribute name="body" value="/pages/admin/atorganisation/organisationSearch.jsp" />
<put-attribute name="list" value="/pages/admin/atorganisation/organisationList.jsp" />
</definition>
<definition name="atOrganisationAddTemplate" extends="mainTemplate">
<put-attribute name="title" value="Organisation" />
<put-attribute name="body"
value="/pages/admin/atorganisation/organisationAdd.jsp" />
<put-attribute name="list"
value="/pages/admin/atorganisation/organisationList.jsp" />
</definition>
</tiles-definitions>
主要模板:
<body>
<div id="dialogd" title="Confirmation Required">
Do you really want to delete selected row
</div>
<div class="container-fluid master-depot-wrp">
<div class="row-fluid">
<div class="span3 master-depot-left">
<div class="inner-logo"><img src="img/logo.png"/></div>
<div class="left-menu-wrp">
<tiles:insertAttribute name="header" />
<tiles:insertAttribute name="menu" />
</div>
</div>
<!--/LEFT span-->
<div class="span9 master-depot-right">
<div class="row-fluid">
<div class="depot-header">
<span class="header-text"><tiles:insertAttribute
name="title" /></span>
<div class="header-menu">
<em class="login-user"></em><span>User
Name : <s:property value="User.auUsername" />
</span> |
<a href="<s:url action="logoutsecurity"/>"> <em
class="log-out-link"></em><span>Log Out</span>
</a>
</div>
</div>
<!-- header end -->
<div class="toolbar-wrp">
<ul class="toolbar-menu">
<li><sj:submit formIds="post" value="" title="SAVE" cssClass="bt-save ttp"/></li>
<li><sj:submit formIds="add" value="" title="ADD" cssClass="bt-add ttp"/></li>
<li><sj:submit formIds="delete" value="" title="DELETE" cssClass="bt-delete ttp"/></li>
<li><sj:submit formIds="search" value="" title="SEARCH" cssClass="bt-search ttp"/></li>
<li><sj:submit formIds="edit" value="" title="EDIT" cssClass="bt-edit ttp"/></li>
</ul>
</div>
</div>
<!-- row-fluid end -->
</div>
<!-- span 9 end -->
<div class="span9 body-wrp">
<tiles:insertAttribute name="body" />
<tiles:insertAttribute name="list" />
</div>
</div>
<!-- row -->
</div>
<!-- master -->
<footer class="depot-footer">
你能指导我实现我的需要吗? 我在使用ajax时看到了一些关于这个加载问题的文章,但这些文章并不清楚(如果你想要我提供的整个代码。) 谢谢。