xPages @DbLookup issue

别说谁变了你拦得住时间么 提交于 2019-12-11 18:44:49

问题


I have this code in several repeat controls and computed values

 @Unique(@DbLookup(database,view,key,columnnumber))

I can see that if "columnnumber" is a categorized column then DbLookup only return first Category.

Today my solution is create another view with this column Uncategorized, but this is bad solution for my customer, and more work for me.

Somebody knows if this is a bug? or is there another solution?

I have Lotus Domino 8.5.3 UP1 and same designer

Thanks a lot,


回答1:


You can get the view entries this way:

var vc:NotesViewEntryCollection = database.getView("view").getAllEntriesByKey(key, true);

Then you can loop the collection with:

var ve:NotesViewEntry = vc.getFirstEntry();
ve = vc.getNextEntry();

In the loop, get the column value with:

ve.getColumnValues();

My understanding is that this will perform better than @DbLookup which - I believe - has similar code underlying it. Fastest way to loop a view is to use a ViewNavigator as Fredrik suggested:

http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Fast_Retrieval_of_View_Data_Using_the_ViewNavigator_Cache




回答2:


Try using @DbColumn instead or a viewnavigator.



来源:https://stackoverflow.com/questions/14089764/xpages-dblookup-issue

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