Tag Archive: Xpages

Getting the Correct Syntax for JavaScript in XPages

I was recently working on a project where my code was injecting XPage elements onto the page at runtime.  To do that, you need to know a lot of syntax.  Syntax that isn’t in the help file, or blogged about, or easily findable.  Sure, there’s this, but that isn’t exactly reader-friendly, nor are there examples of how to use the elements.  Just because you know you’re using “XspInputText”, doesn’t mean you know how to use it.  What’s the syntax for adding an attribute, for example?  Or maybe you know the syntax structure, but need to know what the parameter looks like in the code.

Designer Data Panel for Date Field For example, you want to add a Date field with certain parameters set.  You know how to set them in Designer in the data panel, but how do you set those parameters programmatically in JavaScript?

Thankfully, Toby Samples showed me a cheat to find out.  Create a dummy XPage, add your element and do whatever it is you want to do, i.e. set the parameters for your date field.  Save the page.  In Designer, go to Package Explorer and your nsf.  Expand the Local folder and then the xsp folder.  There you’ll see all of your custom controls and XPages with a .java extension.  Double-click on the XPage.java file.  It will open and there you’ll see the Java code used to generate that XPage, including your element and how the parameters were set programmatically.  This can be really useful when you’re adding something like an attribute via JavaScript and you can’t find any examples of HOW to add an attribute (or class or value binding or any other property).

Example, if you set the above “display format” to “Date and Time” in the picker, how is that set programmatically?


With the parameter “both”.  Good luck figuring that out on your own.

File under: “Things you may have already known, but I didn’t, and I share it just in case you didn’t either” AND “Blog post titles I struggled with actually explaining what the post was about without actually typing the post in the title”

MWLUG 2016 Wrap Up

Last week I was in Austin, TX for MWLUG 2016.  This was my second time speaking at this event, and once again, it was a great experience.

I have been to Texas several times, but had never been to Austin.  I’m still not sure I can say I’ve been to Austin, I feel like I only got to see a small slice of it.  Between humidity that felt like I was drowning (it IS August in Austin) and pouring rain, I didn’t get to get out and about as much as I would have liked (and I even stayed a couple of extra days).  Side note, I’m a giant taco snob and I finally found a good taco.  I don’t just mean in Austin, I mean ever since I moved out of California when I was 17 years old.  So that was exciting.

I attended several sessions (though never as many as I’d like).  How we all still come up with new and interesting content is amazing to me, yet we all still seem to do it.  Lots of Champions were speakers.  You couldn’t go in the hotel lounge area without tripping over a Champion.  If you wanted to talk to a Champ, this was the place to do it.

I talked to a lot of people.  That still feels new to me, and isn’t always something I feel I do well, but this week I had a lot of great conversations with clients, and sponsors, and Champions, and attendees, and speakers, and even taught one of the waitstaff how to play Pokemon Go.

Shean McManus and I gave our session, which was well attended, and I think went very well.  Here’s a link to the slide deck.

They’ve announced that next year will be in Washington DC “or environs”.  I hope to see you there!

Speaking at MWLUG 2016!

I’m pleased to say I’ll be speaking at MWLUG this year in Austin.  This will be my second time speaking at MWLUG and my first time ever to Austin.  I’m looking forward to both!  It’s also my first time speaking with Shean McManus! We will be presenting:

Using Dashboards to Transform Application Data Visualization

When you’re driving a car, you need a lot of data quickly. How fast are you going? Are there any problems you need to address? Where do you get that data at a glance?  Your dashboard, of course. All the info you need at your finger tips, easily understood.

Your applications have a lot of data and important information, but can your users get to it quickly? Can they easily spot issues or know what they need to do right now?  They can if you use dashboards. Modern business applications commonly make use of dashboards to provide easy access to key information.  Shean and Kathy will take you for a test drive through some XPage application dashboards.  They will demonstrate how to move away from email-driven tasks and buried information to show you how you can easily visualize your critical business data.

Come see how an application can provide a visually striking, functional, and easy to use Data Visualization for common workflow actions, important info, charts, and key metrics.  Put your users in the driver’s seat!

Come and watch me attempt to correctly say our session title!  Come and learn some stuff about dashboards!  Come and just say hi!  (Wow, I am enthusiastic for a Monday morning!)

Too Many Design Elements – Or Things I Forgot I Knew

My co-worker, Marky tells me I already knew this and that I told him this when he made the same mistake, but I forgot, or never knew, or something.  So I’m blogging it.  Next time when I google it, I’ll find this post and laugh at myself.  Or maybe I’ll remember.  In any case…

Don’t add all of Sencha ExtJS’s download file to your XPages application.  It’s too many design elements.  As I discovered (again?) the other night.

Screen Shot 2016-02-19 at 4.23.14 PM





“Insufficient memory – too many design elements (Desk Design Pool).” is the error you’ll get, and then you can’t open the application anymore in Designer.  Sadly, you may not get this right away.  Hypothetically, you maybe added all the files, worked with them, did some stuff, wrote some awesome code, and then closed Designer, and THEN you weren’t able to open it.  Hypothetically.  So be warned, if you’re adding a plugin with a lot of design elements (and by a lot, I mean thousands), maybe you’ll want to add them folder by folder.

To “fix” it you can copy the application, open the copy, and immediately delete stuff.  This won’t help your original, but at least you can get at your awesome code that you hypothetically wrote.

Incidentally, it would be a terrible idea to include the entire Sencha ExtJS download anyway because you don’t need it all and it would bloat your application for no good reason.  I guess Designer is just helping you realize that it’s a bad idea.  Thanks, Designer!

10 Lines or Less: Demo App and Slides

Julian Robichaux and I presented “10 Lines or Less: Interesting Things You Can Do With Java” at IBM ConnectED this January.  As promised (if not a bit delayed), here is the sample app, and a link to the slides.

ConnectED2015a.nsf 2

Older posts «