193 Lotus blogs updated hourly. Who will post next? Home | Blogs | Search | About 
 
Latest 7 Posts
HTML5 Canvas to PNG via RPC
Tue, Jun 21st 2016 8
Eternal fustrations with IBM "Help" - - this time trying to give them money
Mon, May 23rd 2016 9
Simple Example: Bootstrap
Tue, May 3rd 2016 9
Import CSVs into a Notes/XPage database
Thu, Mar 24th 2016 9
REST via Service Bean
Tue, Feb 16th 2016 6
Reversing the display order of a Multi-value field (XPages)
Wed, Jan 13th 2016 9
nhttp preview won't "switch ID"
Mon, Dec 7th 2015 13
Top 10
nhttp preview won't "switch ID"
Mon, Dec 7th 2015 13
dataTable column width
Tue, Jul 14th 2015 9
Reversing the display order of a Multi-value field (XPages)
Wed, Jan 13th 2016 9
Import CSVs into a Notes/XPage database
Thu, Mar 24th 2016 9
Simple Example: Bootstrap
Tue, May 3rd 2016 9
Eternal fustrations with IBM "Help" - - this time trying to give them money
Mon, May 23rd 2016 9
StartKeys for categorized viewPanel and number column
Sat, Jul 4th 2015 8
ComboBox - Validate so default value is not selected
Wed, Jul 1st 2015 8
Populate an InputText Date field (that has a calendar picker)
Fri, Jun 26th 2015 8
DirectoryNavigator via Java
Wed, Nov 4th 2015 8


DirectoryNavigator via Java
Twitter Google+ Facebook LinkedIn Addthis Email Gmail Flipboard Reddit Tumblr WhatsApp StumbleUpon Yammer Evernote Delicious
   

So looking into something, I discovered there has been an addition called a "DirectoryNavigator", it's supposed to make it easier to get to person docs in the NAB. I needed something like this, but in Java - the examples are in LotusScript, and I'm working in a bean. Those examples are "TBD". I did get it working, so I'm sharing. It looks like this came out in R8.

What you do is create a vector with the field names you want to retrieve, and you create a vector with what you want to look up (names). You check to see if there is a match, and if so, iterate through the resultset and get the items retrieved. Here is a snippet of the code (dir is the NAB):

            Vector<String> itV = new Vector<String>();
            itV.addElement("ShortName");
            itV.addElement("HTTPPassword");
            itV.addElement("FullName");

            Vector<String> nameV = new Vector<String>();
            nameV.addElement("Smith");

            System.out.println("before dirNav");
            // DirectoryNavigator dirNav = dir.l
            DirectoryNavigator dirNav = dir.lookupNames("$Users", nameV, itV, true);

            while (dirNav.isMatchLocated()) {
                System.out.println("found");
                // dirNav.findFirstName();
                System.out.println("The first value is: " + dirNav.getFirstItemValue());
                for (int i = 0; i < 5; i++) {
                    try {
                        System.out.println("Next value is: " + dirNav.getNextItemValue());
                    } catch (Exception divE) {
                        System.out.println("in catch");

                    }
                }
                dirNav.findNextMatch();
            }

 
Here is the print results. I've obscured the names, but we get the hierarchical names, and the common names.

10/28/2015 08:45:00 AM  HTTP JVM: starting
10/28/2015 08:45:00 AM  HTTP JVM: new start
10/28/2015 08:45:00 AM  HTTP JVM: before dirNav
10/28/2015 08:45:00 AM  HTTP JVM: found
10/28/2015 08:45:00 AM  HTTP JVM: The first value is: [lsmith]
10/28/2015 08:45:00 AM  HTTP JVM: Next value is: [(390ACEC884A01BFDF5FA36AE5E6B29B1)]
10/28/2015 08:45:00 AM  HTTP JVM: Next value is: [CN=RRRRRRRRR]
10/28/2015 08:45:00 AM  HTTP JVM: Next value is: []
10/28/2015 08:45:00 AM  HTTP JVM: Next value is: []
10/28/2015 08:45:00 AM  HTTP JVM: Next value is: []
10/28/2015 08:45:00 AM  HTTP JVM: found
10/28/2015 08:45:00 AM  HTTP JVM: The first value is: [RSmith, smithr]
10/28/2015 08:45:00 AM  HTTP JVM: Next value is: [(CBA717BC74064A8F7EC075DA95ACB8F6)]
10/28/2015 08:45:00 AM  HTTP JVM: Next value is: [CN=TTTTTTTTTTTT]
10/28/2015 08:45:00 AM  HTTP JVM: Next value is: []
10/28/2015 08:45:00 AM  HTTP JVM: Next value is: []
10/28/2015 08:45:00 AM  HTTP JVM: Next value is: []


 You can see I cheated and did hard coded 5 cycles - so when there is nothing to display, you get an empty array. 

This may be useful for someone.

Cheers,
Brian


PS: If whoever does the Notes help wants to use this, or have me do the rest of the methods, I'll volunteer. BM

---------------------
http://dominoherald.blogspot.com/2015/11/directorynavigator-via-java.html
Nov 04, 2015
9 hits



Recent Blog Posts
8
HTML5 Canvas to PNG via RPC
Tue, Jun 21st 2016 1:21p   Brian M. Moore
Declan Lynch provided a Signature Capture Control on OpenNTF some time ago. I had downloaded and played with it a bit, but hadn't had a production use for it, but it worked just like it said on the tin - drop it in and use it. Recently I was asked to come up with a way to let people sign into an event using tablets, so a perfect opportunity to pull it out. It was a breeze to add it to the sign-in portion, we display a page on a mobile device and the user can sign in on the canvas. That was the
9
Eternal fustrations with IBM "Help" - - this time trying to give them money
Mon, May 23rd 2016 11:22a   Brian M. Moore
So I find I need to purchase a Domino license again, this happens for independent developers. I make my selection and get taken to what IBM is now calling the "Marketplace" to check out. However the option to enter a credit card to actually pay for my purchase is greyed out. So I call in. There is a wait and a lady answers. She asks the typical questions and then for me to send them an email with a screen shot. I ask for a ticket number so I can track this request (my reopened ticket for Bluem
9
Simple Example: Bootstrap
Tue, May 3rd 2016 8:23p   Brian M. Moore
The Bootstrap library is a great way to do responsive design, and it's been incorporated into the Extension Library so you can use it "out of the box". The problem I've found is that the samples provided are pretty complex. Not too helpful if you are starting out since you have to try to figure out callbacks and a lot of other stuff to get to the points you want. I think overly complex starter examples are a waste. They let the creator think they have provided something without actually hel




Created and Maintained by Yancy Lent - About - Planet Lotus Blog - Advertising - Mobile Edition