Search

What the Quote?

"Everywhere you look, the look is brunschwig."

Brent Bowers

"I yawned through your light bulb."

Laura Tripcony

"Some web developer is SO proud of this, and it is pretty brilliant... except that IT SUCKS."

Nathan T Freeman

« the physics of Peter Pan | Main| an open letter to Senator Saxby Chambliss »

harnessing the XPages Extensibility API is now even easier

Category diy xpages
In our day job. Nathan, Keith and I (among others) use the XPages Extensibility API constantly. In fact, I suppose one could argue that it's pretty much all we do all day. But we're not using all of it every day, and like any technique that's only sporadically used, it's easy to forget the exact syntax for implementing and registering, for example, your own custom PhaseListener. As a result, each time we have a need to use a portion of the API that we haven't for a while, we often find ourselves digging through our project source tree so that we can use an existing implementation to jog our memory. As you might imagine, that source tree is a bit... well... massive.

So Nathan took it upon himself to make it easier to find example implementations by creating an OSGi plugin that consolidates examples of every reusable artifact that the Extensibility API allows us to create into a single library. And then he donated it to OpenNTF... he calls it the XSP Starter Kit. As detailed in the project overview, here's a list of some of the reference implementations this library contains:
  • Custom ApplicationFactory
  • Custom FacesContextFactory (including custom ExternalContext)
  • Custom Lifecycle
  • PhaseListeners
  • ApplicationListeners
  • SessionListeners
  • FacesContextListeners
  • ValueChangeListeners
  • ActionListeners
  • Custom PropertyResolver
  • Custom VariableResolver
  • Custom ViewHandler
  • NavigationHandlers
  • Custom StateManager
  • Resources and ResourceProviders
  • SSJS Library Provider
  • ManagedBeans for all 4 scopes (Application, Session, View, Request)
  • SessionScope generic storage map (be cautious with this, as it's a bad idea to share content that should be secure)
  • Implicit globals for SSJS

So... yeah, pretty much everything. But do you notice something obvious missing from the above list? That's right: UI Controls. After all, that's the first thing that comes to mind when we think about the Extensibility API, right? Well, this starter kit does include an example control as well. But controls are just a drop in the bucket compared to everything about the XPages runtime that the Extensibility API allows us to customize; I suppose you could consider this library an example of the whole bucket. So if you happen to notice anything else missing from this library that you'd like to see included as a reference implementation (<cough>custom data source</cough>), submit a feature request to the project... or request SVN access to the org.openntf.xsp.starter project and commit your own example.

Comments

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)