My XPage has a view data source with a search formula (\"Search in view results\") constructed from URL parameters.
The search results are displayed in a repeat cont
When you're accessing the dominoView datasource via SSJS you're not getting the dominoView but the NotesView associated with it. That's why the properties and methods available are for the NotesView class. But the search is being performed on the dominoView datasource front-end not on the NotesView object associated with it.
Instead of using the datasource, get the control that uses it (e.g. A repeat, viewPanel etc) and use the getRowCount() method. This will give you the right total. E.g.
getComponent("repeat1").getRowCount()
Using the View caption property....
sample: "Displaying 30 of 30220"
<xp:this.caption><![CDATA[#{javascript:return "Displaying " + getComponent("viewPanel1").getRowCount() + " of " + view1.getAllEntries().getCount();}]]></xp:this.caption>
NOTE: This counts the categorized row as well.