Reputation: 243
I am loosing hair over this: I am writing a small XPage application on Lotus Domino 8.5.3. I want to use data from a view which I can filter by a key (see this.keys below) while having sortable column headers. To do this I am using a viewPanel and it works as expected until I try to sort a column, and then all results disappear (the table is empty).
If I remove the "this.keys" block, then the column sorting works. If I add it back, the data is initially filtered as expected, but as soon as I try to filter a column, the page refreshes and all records are gone (the table is now empty).
I've spent several hours trying work arounds but to no avail.
Any help would be greatly appreciated. Thanks in advance!
Alex
The XPage code in it's entirety looks like so:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"
pageTitle="Completed Status">
<xp:this.resources>
<xp:headTag tagName="link">
<xp:this.attributes>
<xp:parameter name="rel" value="stylesheet"></xp:parameter>
<xp:parameter name="type" value="text/css"></xp:parameter>
<xp:parameter name="href"
value="/interface/css/xpage.css">
</xp:parameter>
<xp:parameter name="media" value="screen"></xp:parameter>
</xp:this.attributes>
</xp:headTag>
</xp:this.resources>
<h1>Completed Status</h1>
<xp:table>
<xp:tr>
<xp:td>
<xp:text escape="false" id="title"
style="font-weight:bold">
<xp:this.value><![CDATA[#{javascript:
var instanceId = context.getUrlParameter("InstanceID");
var title = 'All Recipients';
if(instanceId!=null) {
var view = session.getCurrentDatabase().getView("(InstancesByInstanceID)");
var instance = view.getDocumentByKey(instanceId,true);
if(instance!=null) title = 'Recipients for ' + instance.getItemValueString('Title');
}
title;
}]]></xp:this.value>
</xp:text>
</xp:td>
<xp:td align="right"></xp:td>
</xp:tr>
<xp:tr>
<xp:td colspan="2">
<xp:viewPanel rows="30" id="viewPanel1"
var="recipient">
<xp:this.facets>
<xp:pager partialRefresh="true"
layout="Previous Group Next" xp:key="headerPager" id="pager1">
</xp:pager>
</xp:this.facets>
<xp:this.data>
<xp:dominoView var="recipients"
viewName="CompleteStatus">
<xp:this.keys><![CDATA[#{javascript:
var instanceId = context.getUrlParameter("InstanceID");
if(instanceId!=null) return instanceId;
}]]></xp:this.keys>
</xp:dominoView>
</xp:this.data>
<xp:viewColumn id="viewColumn1" contentType="HTML"
columnName="$16">
<xp:viewColumnHeader id="viewColumnHeader1"
value="Category" sortable="true">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="Name" id="viewColumn2">
<xp:viewColumnHeader id="viewColumnHeader2"
value="Recipient" sortable="true">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="IsCompleted"
id="viewColumn3">
<xp:viewColumnHeader value="Completed"
id="viewColumnHeader3" sortable="true">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="$13" id="viewColumn4">
<xp:viewColumnHeader value="Date Last Modified"
id="viewColumnHeader4" sortable="true">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="$6" contentType="HTML">
<xp:viewColumnHeader id="viewColumnHeader5">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="$14"
contentType="HTML">
<xp:viewColumnHeader id="viewColumnHeader6">
</xp:viewColumnHeader>
</xp:viewColumn>
</xp:viewPanel>
</xp:td>
</xp:tr>
</xp:table>
<xp:br></xp:br>
</xp:view>
Upvotes: 1
Views: 741
Reputation: 243
This just in: It appears that this is a known problem in Lotus Domino 8.5.3:
Title: LO79744: XPAGES: SORT ANOTHER COLUMN NOT WORK ON "FILTER BY COLUMN VALUE" URL: https://www-304.ibm.com/support/entdocview.wss?uid=swg1LO79744
Upvotes: 0
Reputation: 3593
You have made the view columns themselves sortable right? Both directions? I believe that's key.
Upvotes: 1