I encountered a possible issue, but maybe i am missing something:
I have a view with three categories:
Column 1: Category 1
Column 2: Category 2
Column 3: Category 3
Column 4,5: some totals
I am trying to use a the following code:
viewNav = view1.createViewNavFromCategory(“Cat1\Cat2”)
But: it returns only the complete first category “Cat1” in the navigator !?
The help states explicitly:
Lotus Domino Designer XPages Reference > Domino > NotesView
createViewNavFromCategory
Creates a view navigator for all entries in a view under a specified category. […]
–>Subcategories can be specified using backslash notation (don’t forget to escape the backslashes), for example, “Asia\Korea” means the subcategory “Korea” under the main category “Asia.”
[…]
I have to use the following code to get to the category i actually want to use:
var viewEnt:NotesViewEntry = viewNav.getFirst();
// skip the first entry
while(viewEnt!=null && !(viewEnt.getColumnValues().size()>1&&viewEnt.getColumnValues()[1]==variableWithMyWantedCategoryName))
viewEnt=viewNav.getNextCategory();
//now we are there, go into this category
viewEnt=viewNav.getNextCategory();
// it also seems to have all following categories… so exit the loop, when we arrive on the next higher category
while (viewEnt != null&&viewEnt.getIndentLevel()>1) {
//actual code goes here
viewEnt=viewNav.getNextCategory();
}
Is this a bug, or am i using it wrong?