Subscribe via Feed

XPiNC Hello World - XPages in the Sidebar on a Composite App.

Paul Hannan, Feb 2, 2010 8:07:53 PM

Here is a quick post on how you can add a XPage to the Sidebar in the Notes Client. Currently this is the only way you can put a XPage in the Sidebar, the other way may be in the future.

So lets start. Take any Composite Application and from the main menu select Actions - Edit Application.

This will open the application in the Composite App Editor. And here we're going to add a XPage Component that has been configured for wiring events (for more on this try this Wiki post). On the Component Palette select to add a new NSF Component.

Name and select the XPage Component from any application, and select OK.

 With the component now created, drag and drop this component from the Palette to the Sidebar.

You can save your changes as they are and your XPage will now appear in the Sidebar, but we're going a step further and wire up the publish and receive events.

With the desired page of the Composite App open, right mouse click on the XPage component in the Sidebar and choose the option Edit Wiring.

 Using the wiring page... 

...wire up the publish and receive events.

Save and close the application in the Composite App Editor. 

Launching the Composite App the XPage component will now display in the side bar.

 And the wiring will work from here too.



4 responses to XPiNC Hello World - XPages in the Sidebar on a Composite App.

Karsten Lehmann, February 3, 2010 1:37 PM

One way could be a technology that is new in 8.5.1:
http://www-10.lotus.com/ldd/compappwiki.nsf/dx/Using_Dynamic_Variable_Substitution_in_Composite_Applications

You can replace the Notes URL with a reference to an Eclipse preference. And Eclipse preferences can be deployed via policy (or created at runtime by Eclipse plugins).

Another approach could be to use "com.ibm.notes.ComputedNotesURL" instead of "com.ibm.notes.url" as briefly described here:
http://www-10.lotus.com/ldd/compappwiki.nsf/dx/deployment-of-nsf-based-composite-applications-with-nsf-and-eclipse-components

I don't know if this also works for the XPages Eclipse viewparts.


Matt White, February 3, 2010 12:41 PM

A great article thanks Paul.

In the real world. if we're reliant on replica IDs for the composite app, how should the app get deployed and installed on user's desktops?

Matt


Paul Hannan, February 3, 2010 10:09 AM

Correct Stephan.
In the above example, the component I'm using is from within the same composite application so Notes:///0000000000000000/ can resolve itself here.
However, if that same component is used on another composite app then the above component will fail.
The workaround here is to use the Rep ID - e.g. Notes:///555576B900355555/xpagesDemoAppViewColumnPublish.component and not Notes:///0000000000000000/xpagesDemoAppViewColumnPublish.component

So to avoid hitting the same problem as above create all your components for the Component Palette on a blank Composite App.

Thanks Stephan, you're keeping me on my toes ;-)

p.


Stephan H. Wissel, February 2, 2010 11:02 PM

Have you tried, there seems to be a bug when using XPages components with the 00000000000 replica-id when the component is *not* in the root directory?