357 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Pods | Blogs | Search | myPL | About 
Latest 7 Posts
NotesIn9 149: Database Resources and Design Definition
Tue, Jul 29th 2014 165
NotesIn9 148: Getting XPages to talk to your phone
Mon, Jul 28th 2014 214
NotesIn9 Celebrates 5 years of ScreenCasting and ALMOST 150 Episodes
Sun, Jul 27th 2014 229
NotesIn9 147: Using dGrowl with XPages
Tue, Jul 22nd 2014 164
NotesIn9 146: Going Mobile with Bootstrap
Tue, Jul 8th 2014 169
NotesIn9 145: Simple Feedback in XPages
Thu, May 29th 2014 276
A conversation with my Son
Tue, May 27th 2014 301
Top 10
Tim Tripcony
Mon, May 12th 2014 783
NotesIn9 136: Using XPages with Bootstrap 3 and FontAwesome
Fri, Jan 17th 2014 685
Tim Tripcony – Rest in Peace my friend
Fri, May 16th 2014 554
The Great XPages Mystery Solved.
Thu, May 8th 2014 540
NotesIn9 138: XPages Combobox Improvements
Thu, Mar 13th 2014 537
NotesIn9 141: Java vs JavaScript Throwdown
Mon, Mar 31st 2014 522
NotesIn9 139: XPages Single Copy Design
Fri, Mar 21st 2014 501
NotesIn9 137: XPages and Web Services
Tue, Mar 4th 2014 446
XPages: The Best of Times,The Worst of Times
Wed, Apr 23rd 2014 439
Announcing the Eastern PA Meetup and XMage Memorial
Wed, May 14th 2014 434

XPages Gut Check
David Leedy    

I got some bad XPages news today… where I’m doing something that works today… that I feel I should be able to do.. it’s not really that fancy.. but learned that it’s very possible that what I’m doing might not work in the future. :-(

Here’s the issue. If you look at this XPage from xpagescheatsheet.com:

You’ll see a list of contacts in a repeat control. Yes this is an UGLY page. But the inside of the repeat is being generated from a SSJS Object. Why? I wanted to seperate my data from the UI structure. I’ve included that code at the bottom of this post.

What’s a SSJS Object? We’ll I’m just a small town Notes Client Developer at heart. But there is a way to use SSJS similar to a LotusScript Custom Class. I like that. It’s “comfy”. So my SSJS Object can basically have properties and methods/functions.

I demonstrated this technique in my Introduction to XPages Video (Part 2). Skip to minute 42ish to see what I’m talking about.

Anyway – what I’ve learned today.. is that this type of object – which works totally fine in sessionScope today… does not work in viewScope. (I’ve not ever tried that actually). In addition I learned that it’s very possible that this technique will no longer work in sessionScope in the future.

Why? I don’t know. It has to do with “Serialization”. Honestly I don’t know what that means. viewScope is strict about this.. sessionScope “overlooks” this… for now.

The best solution is to “Suck it up, Learn Java and use Managed Beans”. And while I agree that is the best way to go, I feel a little bummed that I’m forced to go the Java path and that SSJS can’t handle something that LotusScript did so very well.

Anyway… this might not be a huge deal.. I don’t know.. Maybe I’m the only one really trying to do this. I am certainly not the best XPages/JavaScript dev in the land. Far from it actually. I just liked learning and working with SSJS in a similar way that I used LotusScript. It helped me with the transition.

I will say that I did reach out to someone from IBM, and very quickly got a nice response giving me details on this and even a potential workaround. I’ve not fully digested that information yet, but I very much appreciate the IBMers that took the time to get involved!

I’ll be playing with this stuff this weekend, but I think the moral is that XPages development, unfortunately, needs more Java skills then I originally thought, and more then I would have wanted. :(

Here is the code structure of the SSJS object:

var contactDoc = (function contactDoc(key) {

// Key really needs to be a string here. Convert it before it gets passed in.

//Pull data from External Datbase
// Here are the Database and View Names
var dbName = “FakeNames.nsf”;
var viewName = “ByName”;
// I assume that the database we’re looking up is in the SAME PATH as the current db
var path = database.getFilePath().split(database.getFileName())[0];
var fullDB = path + dbName
var lookupDB:NotesDatabase = session.getDatabase(database.getServer() , fullDB);
//var vLookup:NotesView = lookupDB.getView(viewName);

//print(“key=” + key);

var size = @Length(key)

if (size > 15)
//This is a Unid
var unid = key;
var contactDoc:NotesDocument = lookupDB.getDocumentByUNID(unid);
var contactKey = contactDoc.getItemValueString(“number”);

var temp = 1
var status = true
else if (size>1 && size <= 15)

// Key must be an @Unique or ProjectKey
var lookup:NotesView = lookupDB.getView(“ByNumber”);
// print(lookup.getSelectionFormula());
var contactDoc:NotesDocument = lookup.getDocumentByKey(key, true);
var unid = contactDoc.getUniversalID();
var contactKey = contactDoc.getItemValueString(“number”);
var status = true
var temp = 2
var status = false
var contactKey = “”
var temp = 3

return {
getUNID: function() {
return unid;
getKey: function() {
return contactKey;
getFirstName: function() {
return contactDoc.getItemValueString(“firstname”);
getLastName: function() {
return contactDoc.getItemValueString(“lastname”);
getFullName: function() {
return this.getFirstName() + ” ” + this.getLastName();


Jun 10, 2011
41 hits

Recent Blog Posts

NotesIn9 149: Database Resources and Design Definition
Tue, Jul 29th 2014 6:55a   David Leedy
In this show IBM Champion and everyone’s second favorite Doctor returns to NotesIn9.  That’s right, Dr. Marky Roden is in the house with a GREAT tip on ways to speed up Domino Designer by using Design Definition to better control your database resources. We last saw the good Doctor back on September 13th, 2012, Episode 74,  talking about using jQuery. Don’t miss todays demo.  You never know if he’ll disappear for another 684 days again. === Also yesterday I mentioned t [read] Keywords: domino ibm notes database

NotesIn9 148: Getting XPages to talk to your phone
Mon, Jul 28th 2014 6:12a   David Leedy
Today we get another great contributor in the form of Oliver Busse. His website is oliverbusse.com.  He’s going to do a really neat demo of how to intergrate XPages with Pushover.net to send messages to a phone that has the PushOver App installed. I think that it’s always nice to see how to mix XPages with other services. [read] Keywords: xpages

NotesIn9 Celebrates 5 years of ScreenCasting and ALMOST 150 Episodes
Sun, Jul 27th 2014 7:03p   David Leedy
On July 11, 2009 I uploaded the first ever NotesIn9 to YouTube.  The topic was this brand new concept in XPages called “Repeat Controls”. 5 years and 260,000ish downloads later and with the help if MANY people I’ve published 147 episodes so far and WILL hit 150 this week, and maybe even more. Not too shabby for a little show based mostly on XPages I think. As always I want to thank all the contributors to the show.  Without them I could never have gotten this far. Thanks for [read] Keywords: notes xpages

NotesIn9 147: Using dGrowl with XPages
Tue, Jul 22nd 2014 6:30a   David Leedy
In this show Brad Balassaitis returns to Ni9 to give us some great instruction on how to start using the “dGrowl” project with our XPages applications.  This is a tool that lets you popup messages back to the user. It’s a somewhat common effect and I really really like it.  Actually before I got this demo from him I was attempting to do something similar inside Bootstrap4XPages and now I might try and switch to dGrowl for the additional features. In addition to using dGrowl t [read] Keywords: notes xpages applications dojo

NotesIn9 146: Going Mobile with Bootstrap
Tue, Jul 8th 2014 11:14a   David Leedy
In this show, we get another great new contributor joining the NotesIn9 family.  Please welcome Sean P McManus to the show. His blog is: http://spmcmanus.net  I’m really excited to get Sean on as he gives us a great demo on using Bootstrap for an XPages mobile focused application. Sean manually added Bootstrap to his application.  Another option is to use a great project on OpenNTF to do this for you via an update site. http://bootstrap4xpages.openntf.org/ http://bootstrap4xpages.com/ A [read] Keywords: notes xpages application java mobile openntf

NotesIn9 145: Simple Feedback in XPages
Thu, May 29th 2014 4:57p   David Leedy
This is the last show I have from Tim Tripcony.  This is probably the simpliest demo he’s done for Ni9 but no less important.  It’s a demo of a way to return a message to a user based on an action. Tim actually gave me this demo maybe a year ago and I just totally forgot about it and I assume he then did as well. While I hate the thought of forgetting about it I think it makes this show a little special.  I was so happy to discover it when I went through our shared dropbox. #cod [read] Keywords: xpages


A conversation with my Son
Tue, May 27th 2014 7:12a   David Leedy
When I did the Java vs. JavaScript through down I included my son in the video for comedic effect. He got a good response so I thought I’d give you a snippet of a conversation from this weekend. Me: “Tell the girls we are having popcorn and ice cream for dinner” Matt: “that is the stupidest idea I’ve ever heard.” Me: “you think it’s a stupid idea?” Matt: “I mean, not literally..I think it’s a great idea” That’s how [read] Keywords: notes java javascript

NotesIn9 144: OAuth for Domino Walkthrough
Tue, May 27th 2014 6:02a   David Leedy
In this show Tim Tripcony explains how to get your Domino server to PROVIDE OAuth credentials and services. #codefortim Note: This show is a odd resolution because Tim sent me his demo at a bigger size then normal.  Because of this I’m not sure if it will play on mobile devices. [read] Keywords: domino mobile server

NotesIn9 143: Component vs Value binding in XPages
Thu, May 22nd 2014 6:42a   David Leedy
In this show Tim Tripcony explains that while we’ve typically been binding to a value all this time, it’s possible to bind to a component inside your XPages Development. This show was originally published elsewhere and I basically grabbed this to try and improve the visibility and get Tim’s information as much exposure as possible. #codefortim [read] Keywords: xpages development

Tim explains JSON-RPC #codefortim
Wed, May 21st 2014 5:55a   David Leedy
First I want to highlight OpenNTF’s recent post regarding Tim’s projects.  Let me simply say that I think the #codefortim idea is brilliant. Pure genius and so appropriate.  Tim shared.  Period. I just read that post like 5 minutes ago so I’m going to let it sink in before I talk any more about it. Which brings us to the topic of today.  This email exchange I’m going to post was forwarded to me by my friend Dan.  He asked Tim a question and as usual got a great resp [read] Keywords: xpages ajax application dojo email exchange exchange java javascript openntf server sql

Created and Maintained by Yancy Lent - About - Blog Submission - Suggestions - Change Log - Blog Widget - Advertising - Mobile Edition