问题描述
我有一些 SSJS 对视图执行 FTSearch 并返回一个 viewEntryCollection:
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();
我知道 veCol 包含我想要的 viewEntries 并且它们的顺序正确.现在我想定义一个数据源,我将用作重复控件的数据源.我认为答案涉及创建对象数据源,但我找不到有关如何执行此操作的任何文档.非常感谢任何指点.
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.
推荐答案
您可以通过执行以下操作将您的视图条目集合用作重复的输入:
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>
这篇关于使 viewEntryCollection 成为 objectDataSource的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!