359 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Pods | Blogs | Search | myPL | About 
Latest 7 Posts
NotesIn9 162: Learning XPages Part 3 – Source Control
Tue, Oct 21st 2014 40
NotesIn9 161: Designer Plugins
Tue, Oct 21st 2014 200
NotesIn9 160: Learning XPages Part 1 – Installing Designer
Sun, Oct 19th 2014 200
NotesIn9 159: Introduction to Select2 in XPages
Wed, Oct 15th 2014 227
Email Do’s and Don’ts
Tue, Oct 14th 2014 294
NotesIn9 158: Intro to the Frostillicus Framework
Fri, Oct 10th 2014 243
XPages and iOS8 Update #4
Wed, Oct 8th 2014 365
Top 10
iOS 8 Breaks XPages Mobile Controls
Fri, Sep 19th 2014 631
Big NotesIn9 news coming next week
Fri, Sep 19th 2014 557
Apple’s iOS8 Breaks uploading Photos
Fri, Sep 19th 2014 518
Announcing the NotesIn9 Hackathon: Race to 199
Wed, Sep 24th 2014 508
NotesIn9 151: Bootstrap ProgressBars in XPages
Sun, Aug 10th 2014 484
NotesIn9 136: Using XPages with Bootstrap 3 and FontAwesome
Fri, Jan 17th 2014 448
NotesIn9 Celebrates 5 years of ScreenCasting and ALMOST 150 Episodes
Sun, Jul 27th 2014 439
Changes for NotesIn9
Sun, Sep 7th 2014 411
XPages and iOS8 Situation Update 2 – First Fix
Tue, Sep 23rd 2014 410
NotesIn9 148: Getting XPages to talk to your phone
Mon, Jul 28th 2014 383

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

Recent Blog Posts

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


NotesIn9 157: Dabbling in Bootstrap and Font Awesome
Tue, Oct 7th 2014 1:25p   David Leedy
In this show Dan Friedrich, a brand new contributor joins the Hackathon! He’s a customer (like me!) that’s been doing a lot with XPages. He’s going to talk about using Bootstrap and Font Awesome in your XPages applications. Before the demo I take a little time to update the status of the XPages Mobile Controls and iOS8 issues as well as some overall personal opinions on the Mobile Controls themselves. The demo starts around the 10:00 if you want to skip over my opinion stuff. [read] Keywords: notes xpages applications mobile

NotesIn9 156: Introduction to Custom Renderers in XPages
Thu, Oct 2nd 2014 1:25p   David Leedy
In this show, Jesse Gallagher officially starts the NotesIn9 Hackathon with a great introduction on “custom renderers” in XPages.  While this seems to be a really scary topic, Jesse explains it in a way that even I can grasp it. [read] Keywords: xpages

XPages and iOS8 Situation Update 2 – Second Fix
Fri, Sep 26th 2014 12:32p   David Leedy
Ok lets update the situation.  As far as I know we started with 3 problems regarding XPages and iOS8 . 1. Uploading photos to a web app doesn’t work. 2. XPages Mobile Controls don’t work 3. An Edit box with Typehead / drop down selection doesn’t work. In my last post I mentioned that Domino 9.0.1 FixPack 2 corrects issue #3. Now I can report that iOS 8.0.2 corrects issue #1.  In testing I was able to upload a photo again where I could not with 8.0.0.  Technically it was cor [read] Keywords: domino ibm xpages apple applications dojo mobile

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