Making a viewEntryCollection an objectDataSource

佐手、 提交于 2019-12-25 01:21:50

问题


I have some SSJS that does a FTSearch on a view and I get a viewEntryCollection returned:

var veCol:NotesViewEntryCollection = thisAppDB.getView("vwFTSearch").getAllEntries()
veCol.FTSearch(queryString);
viewScope.vsColCount = veCol.getCount();

I know that veCol contains the viewEntries that I want and they are in the correct order. Now I would like to define a dataSource that I will use as the dataSource for a repeat control. I think the answer involves creating an Object Data Source but I can not find any documentation on how to do this. Any pointers greatly appreciated.


回答1:


You can use your view entry collection as input for a repeat by doing this:

<xp:repeat id="repeat1" var="rowEntry" removeRepeat="true">
    <xp:this.value><![CDATA[#{javascript:
        var veCol:NotesViewEntryCollection = thisAppDB.getView("vwFTSearch").getAllEntries()
        veCol.FTSearch(queryString);
    }]]></xp:this.value>
    <!-- add elements to be repeated here -->
</xp:repeat>


来源:https://stackoverflow.com/questions/27335209/making-a-viewentrycollection-an-objectdatasource

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!