Total Number of documents

Hi Friends,

I am facing a strange problem while using one of the server side javascript to to get number of total document from a view.

I an using below code:

getComponent(“MyViewName”).getRowCount();

If my number of document is more than 121 then it display only 121 by default and when i click to 2nd page it gets increased by 30, which would be 151, Again when I click to 3rd page its again increased by 30, that will be 181. Where I have fixed my pagination with 30 record with each page.

But when it reaches to total number of document s then its value never gets changes. And again if I reach to 1st page it shows me 121 records.

Friends, Please tell or suggest me why this is happening. Is there some settings or what I am doing wrong.

I will be very thankful to you for your kind response.

With regards,

Vikas K Sinha

Subject: Working as designed…

Hi Vikas,

What you’re seeing is working as designed, and the expected for the viewPanel.

The data collection for a view panel is limited by the renderer so that if you’re loading a view panel which is made up from a view which contains, say 100s of documents it doesn’t take forever. And so this is what you’re seeing with the row counter. And as you page through the ViewPanel this counter number increases.

This is an intentional restrction we have on the viewPanel - it’s so that we don’t have a performance hit. However, many customers have request that they have the option to over-write this with a property and this is what we have done in 852 - see http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Whats_New_in_852_for_XPages#Last+Page

Hope this helps.

p.