Reputation: 31
I've got two custom controls. One for the table itself (cc-table), and one with 4 pager-controls around the table (cc-pager, 2 Pager, 1 Pager Expand / Collapse, 1 Pager Sizes) with an editable area. I've combined the two cc's in a xpage and when I preview it on the web it looks fine. Even clicking on the pager works and the viewpanel (cc-table) gets updated, but the pager-control itself is not getting updated. F.eg. in the standard pager-control: When I click on "next", the "two" should change to grey text and the "one" should change to a clickable link. In my case the pager keeps unchanged, so that I cannot move back to first page.
edit: the custom control:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"
xmlns:xe="http://www.ibm.com/xsp/coreex">
<xp:this.resources>
<xp:styleSheet href="/custom.css"></xp:styleSheet>
</xp:this.resources>
<xp:panel>
<xp:table style="width:100%">
<xp:tr>
<xp:td>
<xp:div style="text-align:left" styleClass="viewCtrlLeft">
<xe:pagerExpand id="pagerExpand1"
collapseText="Alle Komprimieren" expandText="Alle Erweitern"
for="viewPanel1">
</xe:pagerExpand>
</xp:div>
</xp:td>
<xp:td>
<xp:div style="text-align:right" styleClass="viewCtrlRight">
<xp:pager layout="Previous Group Next"
partialRefresh="true" id="pager1" for="viewPanel1">
</xp:pager>
</xp:div>
</xp:td>
</xp:tr>
</xp:table>
</xp:panel>
<xp:panel>
<xp:callback facetName="facet_1" id="callback1"></xp:callback>
</xp:panel>
<xp:panel>
<xp:table style="width:100%">
<xp:tr>
<xp:td>
<xp:div style="text-align:left" styleClass="viewCtrlLeft">
<xe:pagerSizes id="pagerSizes1" for="viewPanel1"></xe:pagerSizes>
</xp:div>
</xp:td>
<xp:td>
<xp:div style="text-align:right" styleClass="viewCtrlRight">
<xp:pager layout="Previous Group Next"
partialRefresh="true" id="pager2" for="viewPanel1">
</xp:pager>
</xp:div>
</xp:td>
</xp:tr>
</xp:table>
</xp:panel>
Upvotes: 1
Views: 876
Reputation:
Set the partialRefresh="false" and it will begin to refresh the pager along with the view itself.
Original Response...
Is the pager a facet of the viewpanel? In cases when I've used a pager with a repeat or data table, I've seen this behavior when I've forgotten to set the for property of the pager.
<xp:pager
partialRefresh="true"
layout="Previous Group Next"
id="pager1"
style="text-align:right"
for="rptRules">
</xp:pager>
Can you post the code so we can see it for ourselves?
Upvotes: 1