359 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Pods | Blogs | Search | myPL | About 
Latest 7 Posts
New iOS8 and Safari problem discovered.
Fri, Oct 24th 2014 104
NotesIn9 164: Learning XPages Part 5 – Application Properties
Thu, Oct 23rd 2014 119
NotesIn9 163: Learning XPages Part 4 – Access Control Lists
Wed, Oct 22nd 2014 119
NotesIn9 162: Learning XPages Part 3 – Source Control
Tue, Oct 21st 2014 139
NotesIn9 161: Designer Plugins
Tue, Oct 21st 2014 254
NotesIn9 160: Learning XPages Part 1 – Installing Designer
Sun, Oct 19th 2014 221
NotesIn9 159: Introduction to Select2 in XPages
Wed, Oct 15th 2014 240
Top 10
iOS 8 Breaks XPages Mobile Controls
Fri, Sep 19th 2014 635
Big NotesIn9 news coming next week
Fri, Sep 19th 2014 561
Apple’s iOS8 Breaks uploading Photos
Fri, Sep 19th 2014 522
Announcing the NotesIn9 Hackathon: Race to 199
Wed, Sep 24th 2014 510
NotesIn9 151: Bootstrap ProgressBars in XPages
Sun, Aug 10th 2014 488
NotesIn9 136: Using XPages with Bootstrap 3 and FontAwesome
Fri, Jan 17th 2014 456
NotesIn9 Celebrates 5 years of ScreenCasting and ALMOST 150 Episodes
Sun, Jul 27th 2014 445
XPages and iOS8 Situation Update 2 – First Fix
Tue, Sep 23rd 2014 415
Changes for NotesIn9
Sun, Sep 7th 2014 412
NotesIn9 148: Getting XPages to talk to your phone
Mon, Jul 28th 2014 387

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
28 hits

Recent Blog Posts

New iOS8 and Safari problem discovered.
Fri, Oct 24th 2014 6:10a   David Leedy
First let’s be clear what I’m posting about. This is NOT an IBM or XPages issue. This is specifically iOS8 and Safari. I posted on StackOverFlow with all the details. The skinny: I have an XPages app that uses a bluetooth Opticon Scanner No problems in iOS7 and Safari. iOS8 and Safari do NOT work well with the scanner. Characters are dropped. It’s not reliable. Using Chrome on iOS8 seems to work fine. I’ve no idea why or what the issue is. I posted on StackOverFlow and i [read] Keywords: ibm xpages apple bug mobile

NotesIn9 164: Learning XPages Part 5 – Application Properties
Thu, Oct 23rd 2014 6:41a   David Leedy
In this show we actually go into Designer and create a new database that we’re going to be working with for our application and I have a little discussion on some of the application properties that are useful for XPages Developement. Some Notes: This show is I believe the first in the new larger Full HD resolution of 1980×1020. This will let me get more on the screen but might be harder to see if you typically use a smaller device. Please let me know how this size works for you. Als [read] Keywords: notes xpages application database properties

NotesIn9 163: Learning XPages Part 4 – Access Control Lists
Wed, Oct 22nd 2014 6:12p   David Leedy
In this show I gave a brief introduction to Database properties and most importantly to Access Control lists for the database. There’s nothing really* here for the experienced Notes developer but if you’re new to the platform you might find the talk on the Access Control lists interesting. * Well there might be one little thing. [read] Keywords: notes xpages database properties

NotesIn9 162: Learning XPages Part 3 – Source Control
Tue, Oct 21st 2014 6:11p   David Leedy
In this show I continue setting up the programming environment by installing Source Tree and pulling down a project that we’ll be using later in the series. My plan is to try and emulate real life, and real life needs some good quality source control so I will ideally be doing a lot of different things with source control along the way. [read] Keywords: xpages

NotesIn9 161: Designer Plugins
Tue, Oct 21st 2014 6:34a   David Leedy
In this show I take a look at adding additional tools to your toolbox.  Specifically we’re going to grab some great projects from OpenNTF.org.  Among them are: XLog Reader Bootstrap4Xpages XPages Ext. Library OpenNTF Domino API Debug Toolbar Some  Notes: When I talked about the OpenNTF Essentials.  I didn’t realize there were 2 projects.  The “runtime” and the “toolbox”.  I was referring to the runtime even though I had clicked on the toolbox. I filme [read] Keywords: domino notes xpages openntf

NotesIn9 160: Learning XPages Part 1 – Installing Designer
Sun, Oct 19th 2014 7:18p   David Leedy
This show beings my great experiment. I’ve wanted to do this for a couple of years actually. I’m going to ATTEMPT to start from scratch and build an XPages Application. I’m going to assume that the viewer has little to no knowledge of Domino Development.  I’ve gotten a bunch of emails from people brand new to the platform so the beginning shows are kinda geared for them. I’m really trying to start from square one. When I get into the Application build – which [read] Keywords: domino xpages application development java openntf

NotesIn9 159: Introduction to Select2 in XPages
Wed, Oct 15th 2014 10:34a   David Leedy
In this show, John Oldenburger, a wonderful new contributor and XPages XPert joins the Hackathon to show us how to use the Select2 project to improve your applications. [read] Keywords: notes xpages applications


Email Do’s and Don’ts
Tue, Oct 14th 2014 7:42p   David Leedy
I’ve been getting a lot more emails from NotesIn9 viewers lately. Many are asking for XPages help with a particular problem. While I prefer questions unrelated to Ni9 to be asked on StackOverFlow.com with the tag “xpages”, just so the question and answer is public and can therefore benefit more people, I’m always happy to get the email and will certainly try and help where I can.  I can’t always.  But I will try.  Some of the emails say something like “I do [read] Keywords: notes xpages community email

NotesIn9 158: Intro to the Frostillicus Framework
Fri, Oct 10th 2014 8:54a   David Leedy
In this show Jesse Gallagher returns to give us an introduction to this amazing Framework he’s created to try and improve the XPages coding experience. I can’t say that I totally “get it” yet BUT it looks VERY interesting. I have so far taken the “controller” piece from the framework and I’m successfully using that in my applications and I’ll be featuring that on NotesIn9 very soon. It’s really improved how I create my applications. [read] Keywords: xpages applications

XPages and iOS8 Update #4
Wed, Oct 8th 2014 6:43p   David Leedy
I just got this tweet! Thanks Pete.  And thanks to the team that’s working so hard on this issue! [read] Keywords: xpages

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