0
votes

On my XPage I have a datasource defined which is a filtered view:

<xp:this.data>
        <xp:dominoView var="viewItems" viewName="myTodoList">
            <xp:this.categoryFilter><![CDATA[#{javascript:return sessionScope.get("userFilter");}]]></xp:this.categoryFilter>
        </xp:dominoView>
    </xp:this.data>

I want to display the data via a repeat control. But I want to display ALL the records in the data-set. How much I compute the xp:this.rows property?

<xp:repeat id="repeat1" value="#{viewItems}"
    var="obj" indexVar="idx">
    <xp:this.rows><![CDATA[#{javascript:getComponent("repeat1").getDataModel().getRowCount()}]]></xp:this.rows>

</xp:repeat>
3

3 Answers

2
votes

The rows property in fact just sets "cut-off" when paging starts. Instead of (vastly) computing current size of the view, just set it to "large enough" value. Magic constant "9999" worked for me, but MAX_INT is the limit, I think.

Bear in mind that for huge amount of data it will take a while to render your page, so you definitely WILL call for performance problems.

Also, there is internal limit ~10k back end C API references for Java Notes* classes - when hit, server/client CRASHES. You should be safe with pure XSP components. Once you spice up your pages with extra code that uses Notes* classes (and does not recycle), especially inside loops/repeats, your limit will be just a fraction of that value.

1
votes

You need to get the item count from your DominoView, not the rowCount from the component’s data model.

You might be careful what you want to do here, a view can potentially be VERY large and user experience be bad.

The extension lib has “infiniScroll” that might be more suitable to what user expect.

0
votes

Have you tried?

<xp:this.rows><![CDATA[#{javascript:var vw:NotesView = database.getView("myTodoList");
return vw.getAllEntriesByKey(sessionScope.get("userFilter"),true).getCount().toFixed();}]]></xp:this.rows>