XPages boilerplate: useful code snippets and modules for your next XPages project
December 11th, 2013When I start a new XPages project, I use lots of code snippets and modules from previous projects. Many of these code snippets and modules are open source or available on blog posts from fellow XPages bloggers. In this blog post I will list some of these useful code snippets and modules and hope that this will inspire you and help you enhance your next XPages project.
Useful code snippets and modules:
- email bean by Tony McGuckin (for easy sending of emails)
- multi-page messages by Mark Leusink (for displaying "error" messages on one XPage that originates from another XPage)
- session expiration phase listener by Weihang Chen (for proper handling of the scenario where the session expires)
- localization setter by Sven Hasselbach (for setting the correct locale for the browser session)
- flashScope by Andy Cunliffe (for creating flashScope variables - a sort of view scope variable that can be used across pages)
- example customizer bean by Jesse Gallagher for the Dynamic View Control from Extension Library (for customizing the look of the generated output of the Dynamic View control)
- JSFUtil: originally introduced to XPages by Tim Tripcony, and since then modified and extended by several. Here's one version of JSFUtil by Jesse Gallagher. JSFUtil is a must-have for working with XPages in Java
- Standby Dialog custom control by Fredrik Norling (for making it obvious for the user of your app that server processing is taking place)
- XPages Document Locker by Fredrik Norling (for easy document locking)
- DbLookup & DbColumn, with cache, sort and unique by Tom Steenbergen (for improved DbLookup and DbColumn with caching support)
- SSJS Form Validation That Triggers ErrorMessage Controls by Don Mottolo (for central validation of input fields)
- DateConverter by Tommy Valand (for easy conversion of dates to/from strings)
- Display warning message if Internet Explorer uses Compatibility View mode by myself (useful for displaying a message to the user if Internet Explorer is set to run in Compatibility View mode)
- Phase listener to set IE to edge or X-UA-Compatible value by Mark Hughes (useful for instance for making Internet Explorer 11 behave by setting the value to "IE=10")
You can also take a look at the XPages Scaffolding project by Jesse Gallagher. At least look at the README.md file in which Jesse describes what's included.
Of course, you should not forget all the useful libraries and tools available in OpenNTF Essentials (both in the Essentials Runtime and in Essentials Toolbox) such as the OpenNTF Domino API, XPages Debug Toolbar and XPages Log File Reader. Also of great value is Auto Logins which provides "remember me" functionality for your app.
Tags: IBM Domino, IBM Domino Designer, IBM XWork Server, open source, OpenNTF, XPages
January 14th, 2014 at 16:41
Impressive, Thanks !!