デモ プロジェクト strut2-tiles-plugin で使用しています。私のタイルは次のようになっています。
<definition name="profileListPanel" extends="basePanel">
<put-attribute name="title" value="menu.adm.pro.title"></put-attribute>
<put-list-attribute name="body-items">
<add-attribute value="/jsp/admin/profile/profileList.jsp"/>
</put-list-attribute>
</definition>
<definition name="profileList" extends="baseLayout">
<put-attribute name="title" value="menu.adm.pro.title" />
<put-list-attribute name="body-items">
<add-attribute value="profileListPanel" type="definition"></add-attribute>
</put-list-attribute>
</definition>
basePanel で繰り返しています
<tiles:importAttribute name="body-items" toName="bodyItems"/>
<s:iterator var="item" value="%{#attr.bodyItems}">
<tiles:insertAttribute value="${item}" flush="false"></tiles:insertAttribute>
</s:iterator>
私が持っているprofileList.jsで
var editPopUp;
$(document).ready(function(){
editPopUp=new PopUp();
$('.edit-profile').click(function(e) {
e.preventDefault();
var url=$(this).attr('href');
editPopUp.openPopUp(url);
});
});
問題: profileList.js が複数回読み込まれ、複数の$('.edit-profile')
イベントが添付されている
いくつかのアイデア?