我使用displaytag来显示带有分页的列表。在第一个显示中,除了单击next或一个页码之外,一切都正常,我得到的页面是在另一个div中。
我使用了spring和struts 2,这是我第一次使用displaytag。下面是我的display标签的代码
<display:table style="width:100%" name="myList" class="MyObjectClass" uid="row" id="row" pagesize="10" requestURI="myAction!myMethod.action"> >
<display:column title="My First Property" property="property1"></display:column>
<display:column title="My 2nd Property" property="property2"></display:column>
<display:column title="My Last Property" property="property3"></display:column>
</display:table>我怎样才能通过点击页码来停留在第一个相同的目标
发布于 2011-11-10 20:32:00
出于兴趣,我解决了这个问题,我将这段代码添加到了jsp页面。
$('span.pagelinks>a, table#displayTab>thead>tr>th>a').live('click', function () {
$.get($(this).attr('href'), function (responseText, status, xmlHttpRequest) {
$('#displayTagDiv').html($('#displayTagDiv', responseText).html());
})
return false;
})div是包含可显示的displayTab的displayTagDiv
我还重新定义了属性next /prever...
https://stackoverflow.com/questions/8069408
复制相似问题