0
votes

When using the "Pager Add Rows" control together with a "Data View" control in a Domino XPages application the user can not open entries which have been added by clicking the "Show more..." link of the pager control.

The reason for this behaviour is that the URLs of the entries which are added by the pager control differ from the URLs of the entries which are loaded originally.

To demonstrate this I have created a very simple example application. It contains a single form "Document" and a single view "($All)". There are two XPages - one called "Document" and one called "View". The XPage "View" only contains a "Data View" control with the summary column set and a "Pager Add Rows" control. Here is the source code of the XPage "View":

<?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">
    <xe:dataView id="dataView1">
        <xp:this.facets>
            <xe:pagerAddRows id="pagerAddRows1" xp:key="pagerTop"></xe:pagerAddRows>
        </xp:this.facets>
        <xe:this.data>
            <xp:dominoView var="view1" viewName="($All)"></xp:dominoView>
        </xe:this.data>
        <xe:this.summaryColumn>
            <xe:viewSummaryColumn columnName="Subject"></xe:viewSummaryColumn>
        </xe:this.summaryColumn>
    </xe:dataView>
</xp:view>

When you open the XPage in a browser (and you have more than 30 documents in the database) the URL of one of the first 30 entries is something like

/db.nsf/%24%24OpenDominoDocument.xsp?documentId=67D5CBA1EAFDF2B0C1257E310049545A&action=editDocument

When you click the "Show more..." link of the pager control the additional entries' URLs are something like

/db.nsf/View.xsp/%24%24OpenDominoDocument.xsp?documentId=889BA0EEE8709BBCC1257E3100495497&action=editDocument

When I specify the XPage to open the documents with (Document.xsp), then the URLs look like this for the original entries:

/db.nsf/Document.xsp?documentId=67D5CBA1EAFDF2B0C1257E310049545A&action=editDocument

and for the additional entries:

/db.nsf/View.xsp/Document.xsp?documentId=889BA0EEE8709BBCC1257E3100495497&action=editDocument

Domino inserts "View.xsp/" into the additional entries' URLs.

After clicking one of the additional entries' links the page is reloaded and now all links contain the "View.xsp" addition.

I am seeing this with versions 11 and 12 of the 9.0.1 extlib version.

1

1 Answers

0
votes

The pager works correctly when I set its property "refreshPage" to true, so the problem seems to be the AJAX refresh the pager performs without that property:

<?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">
    <xe:dataView id="dataView1" pageName="/Document.xsp">
        <xp:this.facets>
            <xe:pagerAddRows id="pagerAddRows1" xp:key="pagerTop"
                for="dataView1" refreshPage="true" partialRefresh="true" refreshId="dataView1">
            </xe:pagerAddRows>
        </xp:this.facets>
        <xe:this.data>
            <xp:dominoView var="view1" viewName="($All)"></xp:dominoView>
        </xe:this.data>
        <xe:this.summaryColumn>
            <xe:viewSummaryColumn columnName="Subject"></xe:viewSummaryColumn>
        </xe:this.summaryColumn>
    </xe:dataView>
</xp:view>