本文介绍了仅显示未读文档当前视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人建议在 XPages ViewPanel 中实现 @Command([ViewShowOnlyUnread]) 吗?
anyone have a suggest to realize @Command([ViewShowOnlyUnread]) in XPages ViewPanel?
能否实现下一个未读"和上一个未读"功能?
And is possibile realize the function "Next Unread" and "Previus Unread"?
推荐答案
不要将视图面板绑定到标准视图数据源,而是尝试将其 value 属性设置为以下表达式:
Instead of binding the view panel to a standard view data source, try setting its value attribute to the following expression:
importPackage(com.ibm.xsp.model.domino);
var targetView = database.getView("Some View");
var unreadEntries = targetView.getAllUnreadEntries();
var unreadModel = new DominoViewEntryCollectionDataModel(unreadEntries);
return unreadModel;
然后,视图面板的行为应与绑定到真实数据源时的行为完全相同,但仅显示未读条目.
The view panel should then behave exactly as it would if it were bound to a true data source, but only display the unread entries.
这篇关于仅显示未读文档当前视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!