Archives for the ‘XPages’ Category

18 Aug 2016

XPages Tip: Populating Date/Time fields in Notes Docs with Date or Time Only

In your XPages app, you can use an EditBox control and set it’s display type to be a Date/Time control with certain formats. 2 examples are Date only or Time only. This all works great, except when you want to save these values to a Notes Document either via SSJS or Java. The saved values are definitely stored correctly in a Date/Time field, but always contain both a date and time value.


Below is a snippet of an EditBox control set up as a Date Only component in an XPage or Custom control, bound to a Java bean of object type “Date”:

XPage Snippet for Date Only

Your Java logic to save this value to a NotesDocument will look something like this:

DateTime tempDate = null;
tempDate = session.createDateTime(bean.dateOnly);
doc.replaceItemValue("DateOnly", tempDate);

Sadly, in the NotesDocument Field Properties tab, the saved value contains both a date and time:

XPages Date Time Value



Thankfully, the solution is very simple. When you create your DateTime object in either Java or JavaScript, before adding it to the doc.replaceItemValue, do the following:

To remove the time from the Date/Time value:

tempDate = session.createDateTime(bean.dateOnly);
tempDate.setAnyTime();//This removes the time value
doc.replaceItemValue("DateOnly", tempDate);

To remove the date from the Date/Time value:

tempDate = session.createDateTime(bean.timeOnly);
tempDate.setAnyDate();//This removes the date value
doc.replaceItemValue("TimeOnly", tempDate);

The above java example is very similar to what you would do in SSJS as well.
As simple as that :)

13 May 2016

My 2 webinars on Optimus XPages: An explosion of techniques and best practices

I’m happy to announce that both my webinar presentations titled “Optimus XPages” are available for viewing.


The first part focuses on techniques and best practices on a high level, where most of the video is presentation slides with a few short demos at the end.

The second video is a lot more fast-past. Nearly the entire video is live code. I pretty much design an XPages Single Page App from start with explanations of what’s happening along the way.

You can delve straight into Part 2, but I do recommend watching Part 1 if you have another 1.5 hours to spare, as it really gives some great insight to how apps should be developed.

Optimus XPages – Part 1: An Explosion of Techniques and Best Practices

Optimus XPages – Part 2: The Deep Dive


I trust you will get great value-add out of these videos. I just want to thank TLCC and Teamstudio for giving me the opportunity to present.

See you on the other side :)
3 May 2016

2 sessions in 1 day. A double whammy of XPages & Bluemix

Come this Tuesday the 10th May 2016, I will be presenting 2 online sessions that focus on IBM XPages and Bluemix.

Session times

Title: The XPages of Things – Integrate Bluemix with Your XPages Applications for a World of Possibilities
Event: IconUS
Date and Time: Tuesday 10th May 2016 – 8:15am (CST)
Duration: 60 Minutes
Title: Optimus XPages Part 2: The Deep Dive
Event: TLCC Online Webinar
Date and Time: Tuesday 10th May 2016 – 10:30am (New York Time)
Duration: 90 Minutes

The XPages of Things – Integrate Bluemix with Your XPages Applications for a World of Possibilities


In this session John will take you through a gripping LIVE demonstration where he pieces together an “Integrated Circuit of Services”, binding an on-premise XPages application with the IBM Bluemix cloud. Learn how to implement Web Sockets for real-time communication; use Watson services to improve user experience, and more.

Join this session and discover how your applications can easily leverage services on the Bluemix cloud to expand on what’s currently possible in XPages.


I’ve been extremely fortunate with this session proving both exciting and successful this year. I show off how easy it is to get up and running with Bluemix integration via on premise software platforms like XPages. Warning…this session is fast-paced, exciting, and most of it is live demonstrations…so if you were hoping for lengthly slide presentations….my apologies ?.

To attend this online session, you need simply register on IconUS’s website, which is free of charge thanks to some awesome sponsors.

I really hope to have you all join in my session. I know it will be worth your time ?.

Optimus XPages Part 2: The Deep Dive


In this webinar, John Jardin will continue his series “Optimus XPages – An Explosion of Techniques and Best Practices”, by providing an end-to-end Deep Dive demonstration on how to apply the methods described in the previous webinar from March, 2016. This follow-on webinar is for the more technical person…a fast paced demo showing off the design and coding, where everything will be explained on the fly.

John will start with a brand new XPages design and end off with a Cloud ready, single page application. Not enough you say? Fear not. John will end the webinar with some easter egg give aways that you don’t want to miss!


I received great feedback from my 1st webinar title “Optimus XPages – An Explosion of Techniques and Best Practices“. That been said, the general feedback what that it was a touch high level, leaving many wondering how to achieve the techniques and practices I mentioned. Well, next week you’ll have the answer.

I will take the core messages from my initial webinar and present them in a live session, showing off the code and practices I used to develop XPages applications. This will be a pretty intense session, as I show off everything live and explain on the fly.

So, if you feel like joining me in this challenge, you can click here to register. I just want to thank TLCC and Teamstudio for giving me this opportunity to present ?.

See you all next week Tuesday ?.
11 Apr 2016

“XPages on Bluemix” is officially a Space on the XPages Knowledge Base

Yup, thanks to an article published today by yours truly ?, the “XPages on Bluemix” Space is officially active on the XPages Knowledge Base.

This is in no way near where OpenNTF want the XPages Knowledge Base to be, but it’s definitely a step in the right direction. For those who don’t know what the Knowledge Base is, click here for more info.

The first XPages on Bluemix Article

The first article is titled Quick Facts about running XPages on Bluemix. The idea behind the article is simple: To provide the community with a quick-to-reference list of the pros and cons of running an XPages application on the Bluemix cloud. I’ve populated a number of positives and negatives and will most likely be updating this article frequently.

This marks the first of many articles to make their way to “XPages on Bluemix” Space. I will be counting on a few contributors to help me make this a reality, but have no fear, much is already in store ?.

Call To Arms

As always, I implore everyone to please contribute in any way possible. For those who don’t have the time to publish articles, you can easily add value by commenting and providing feedback. The article Quick Facts about running XPages on Bluemix is a great place to start. Either comment on this blog post or if you have an OpenNTF account, you can log into the XPages Knowledge Base and provide feedback directly against the article.

What I’m looking for here is everyone’s questions, suggestions and concerns relating to XPages on Bluemix. I’m planning additional articles that will structure this content to be easily referenced by all. The more transparency we have as a community the better.

Thanks in advance everyone. See you on the other side :)


30 Mar 2016

XPages War-cry: Calling all OSGI Plugin experts

I am calling all OSGI plugin experts to assist the XPages community with tutorials and guides on how to create and work with OSGI Plugins.


There is currently a huge demand to either start creating plugins, or assist with Open Source projects in the form of OSGI plugins. Either way, there is a massive lack in knowledge and understanding the processes involved with working on either.

On the XPages Knowledge Base, we have a space for OSGI Plugins. I’m asking all experts that either have created content or are willing to create tutorials, to please join me in populating the OSGI Plugins Space. The sooner we can get more individuals (including myself) working with OSGI plugins, the better it will be for everyone.

If you have content and are not sure how to add it to the Knowledge Base, please contact me and I will assist in any way possible.

Many thanks in advance