I have a Xpages page with a viewPanel control definied. It it filtered by category and contains some columns. One of them is sortable. Unfortunatelly it looses sorting capabilty in the following scenario:
I've tried partial and full refresh but it does not work. What should I do in order to have sorting enabled again?
EDIT
Here is sample code:
<xp:button value="All companies" id="button5">
<xp:eventHandler event="onclick" submit="true"
refreshMode="partial" refreshId="vpDocuments">
<xp:this.action><![CDATA[#{javascript:viewScope.cat = null;}]]></xp:this.action>
</xp:eventHandler>
</xp:button>
<xp:button value="Single Company" id="button2">
<xp:eventHandler event="onclick" submit="true"
refreshMode="partial" refreshId="vpDocuments">
<xp:this.action><![CDATA[#{javascript:viewScope.cat = 'abc';}]]></xp:this.action>
</xp:eventHandler>
</xp:button>
<xp:viewPanel id="vpDocuments" var="rowData"
indexVar="rowIdx">
<xp:this.data>
<xp:dominoView var="view1"
databaseName="#{javascript:computeMyDb()}" viewName="xMyView"
categoryFilter="#{javascript:viewScope.cat}"></xp:dominoView>
</xp:this.data>
<xp:viewColumn columnName="$Company" id="viewColumn1">
<xp:viewColumnHeader value="Company" id="viewColumnHeader1">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="Invoice" id="viewColumn2">
<xp:viewColumnHeader value="Invoice" id="viewColumnHeader2">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="OrderDate" id="viewColumn7"
styleClass="dateColumn">
<xp:viewColumnHeader value="Order Date" id="viewColumnHeader7"
sortable="true">
</xp:viewColumnHeader>
</xp:viewColumn>
</xp:viewPanel>
So the last column is sortable, but after clearing category filter the header in not clickable
Please use the keys
property instead of the categoryFilter
property to fix your issue.