本文整理汇总了Java中lotus.domino.View.refresh方法的典型用法代码示例。如果您正苦于以下问题:Java View.refresh方法的具体用法?Java View.refresh怎么用?Java View.refresh使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lotus.domino.View
的用法示例。
在下文中一共展示了View.refresh方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getView
import lotus.domino.View; //导入方法依赖的package包/类
protected View getView() throws NotesException {
Database db = DominoUtils.getCurrentDatabase();
View view = db.getView(_viewName);
view.setAutoUpdate(false);
view.refresh();
return view;
}
示例2: createDiscussionDocuments
import lotus.domino.View; //导入方法依赖的package包/类
void createDiscussionDocuments(Database db) throws NotesException, IOException {
// Construct a list of authors
// As we want the tag cloud to render differences between the authors, we give
// as different weight to each author by adding it a random # of times in the list
// We read the author names from the database
ArrayList<String> users = new ArrayList<String>();
View authorView = db.getView("AllContacts");
authorView.refresh();
try {
int maxAuthors = 15;
int nAuthor = 0;
ViewEntryCollection authorCol = authorView.getAllEntries();
for(ViewEntry e=authorCol.getFirstEntry(); e!=null && nAuthor<maxAuthors; e=authorCol.getNextEntry()) {
Vector<?> values = e.getColumnValues();
String name = (String)values.get(7);
// Add it a random number of times to the list
int n = ((int)(Math.random()*maxAuthors))+1;
for(int jj=0; jj<n; jj++) {
users.add(name);
}
nAuthor++;
}
} finally {
authorView.recycle();
}
if(users.size()==0) {
// Just in case they were not created...
users.add("John Doe");
}
View w = db.getView("AllThreads");
w.getAllEntries().removeAll(true);
createDiscussionDocument(db, null, users, new int[]{0}, disc_rootDocs);
}