1
我有一個簡單的用例Struts2的股利阿賈克斯刷新
<div id="contentDiv">
<!-- This does not work -->
<div id="frmDiv">
<s:form action="..">
<s:a target="contentDiv" theme="ajax">Reload</s:a>
</s:form>
</div>
<!--This works -->
<div id="listDiv">
<s:a target="frmDiv" theme="ajax" someaction >Click Me</s:a>
</div>
</div>
我注意到,當一個鏈接的目標是相同的目標內,則該阿賈克斯行動是行不通的。而當鏈接的目標是在div之外時,按需要工作。
任何解決方法重新加載相同的div或將其設置爲ajax結果的目標。
我用struts 2.0.14
而且,這裏,而不是鏈接,如果我用這個按鈕不起作用。任何解決方法將不勝感激。