The data for my combobox resides in a categorized Notes view in a solid NSF so I had two options: navigating through the NotesView via a ViewNavigator (probably next post) or a quick and dirty combo of a dbcolumn and dblookup.
In context with the combobox control the dbcolumn/lookup combo seems suitable 🙂
Here is the simplified setup for my xp:combobox:
As data source I am calling a method on a managed bean. The method is as followed:
The result is nice and straight-forward:
If you questions or difficulties with the implementation, just give me call. Happy development 🙂
XPages has a 32 or 64 ( can’t remember which ) limit for the lookup formula whereas in Notes the limit is only for the whole of the formula e.g. after @unique is applied.
It makes it very hard to have meaningful drop downs for filtering data.
Instead you can use SSJS e.g.:
var lookupView:NotesView = database.getView(“<LOOKUPVIEW>”);
This is the equivalent to:
@DbColumn( “”,”<LOOKUPVIEW>”, 1 );
and returns you the full result without the limit.
But this also brings me to the following problem:
When I enable Select2 on a loooong combobox the list is populated the type-ahead / filtering works fine BUT when I select a value long down the list the response of the select2 combobox becomes really sloooow.