The createViewNavFromCategory method in the NotesView class has the following bug:

if the user has no rights to read all documents in the category you specified,
this method does NOT return an empty view navigator but a navigator FOR ALL SUBSEQUENT CATEGORIES IN THE VIEW.


Example:

You have a categorized view by company names.
Some documents in this view has a reader field, and you are not authorized to see the documents in the category "ITWU".
The view will look like this:

 

 

Now, you write the following Java code:

Database db = DominoUtils.getCurrentDatabase();
View view = db.getView("myview");
ViewNavigator nav = view.createViewNavFromCategory( "ITWU" );

You probably suppose to get an empty view navigator but that's where you are wrong;
the view navigator is for all entries in the categories Microsoft and SAP

This phenomenon does not happen in the getAllEntriesByKey method.


Workaround:

Check the first entry in the view navigator again if you have the correct category.
Attention: if the column is a multi-value field, you have to check it too.

ViewEntry entry = nav.getFirst();
if( entry != null )
{
    if( !"ITWU".equals( entry.getColumnValues().get(0).toString() ) )
    {
        System.out.println("not found");
        return;
    }
}

 

 

Neues vom ITWU-Blog

ITWU-Projektvorstellung: Die kluge Scan-Lösung - Automatisiert Lieferscheine scannen und prozessintegriert verarbeiten mit dem Canon Scan-Import - Weiterlesen
Das neue HCL Download-Portal My HCLSoftware (MHS), EOS Domino V11 und Sametime V11.5 - Weiterlesen
HCL Lizenz Update: Umstellung auf Complete Collaboration Lizenzen (CCB), EOM und EOS für alte Lizenztypen und Änderungen der jährlichen Preissteigerung - Weiterlesen
Update-Info: HCL Notes Domino 14 Fix Pack 1 - Weiterlesen
Mit ITWU Simple Signature automatisch generierte HTML-Mailsignaturen für HCL Verse und Notes erstellen - Weiterlesen
ITWU-Projektvorstellung: Digitale Werkszeugnisse automatisch erzeugen, standardisiert und transparent - so geht smarte Qualitätssicherung! - Weiterlesen
DOMI im Verse-Kalender 3.2.1 und unsere Roadmap in Sachen Teams@Notes und MS O365-Integrationen - Weiterlesen
 zum Archiv