Accessing advanced properties from an XPage component

A question from the business partner forum was asked how to access a components preference, the ones entered in the Advanced Preferences panel in the Composite Application Editor.  I got this tip from Padraic Edwards on the XPages team.  This should help anyone wanting to get an XPage component into a composite or an Eclipse based perspective.

I edited my XPage component to include a new property named “BobsValue” with a value of “The Value is RED”:

xpage-comp-props-1

What you have to do in the XPage application is access it using the context API’s.  First thing you need to do however is add a parameter with the same name in the component definition.

xpage-comp-props-2

Now when you access the property in your XPage event or page you simply call the method as follows:

context.getComponentParameter("BobsValue");

Here I just printed the value to a dynamic label on the XPage component:

xpage-comp-props-3

Adding configuration panels to your custom component

If you are one of the low level Eclipse/Java people out there and you want to create Eclipse components for Lotus Notes 8.5 you might want to check out the new article on the CA Wiki.  There is an extension in the CAE that allows you to contribute your own configuration tab (user interface) to the Advanced Properties dialog for your component.  This would make configuring your component as custom as you would like.

_1_12538877869535-2576

If you use the OpenSpan container for native applications you can see the extent to which they customized this dialog.  You can check out their demo which shows how to integrate a native application into Lotus Notes.

Referenced article is here.

Two new tutorials for web based components

Integrating web based components into Lotus Notes is becoming more and more popular. Whether they are Widgets in the side bar, Xpage components or full blown web sites as components  you can now do some pretty interesting integration with not a lot of effort.  These two articles below show how you can take ordinary web based applications and integrate them in with your Lotus Notes databases in the rich client.  The first article is somewhat of a primer for web based components so start there.  The second one shows how you can write a custom action to execute JavaScript on any web page and have that action wired to another components property.

Articles on the CA Wiki:

Creating a basic web component

Create a custom container action that executes JavaScript.

Code Snippet: Locating the source or target view part from a Property Broker action

This is a commonly used piece of function if you are writing SWT based components that use Property Broker for declarative communication.  The SWTHelper class does a few things that can make you code easier to follow.  If you have any other suggestions around this space get with me or post feedback on the wiki.

Locating the source or target view part from a Property Broker action

Code Snippet: Getting a components preferences

Making your components data driven is a key area of composite applications.  This gives the assembler the ability to change the characteristics of your component at assembly time.

Getting a components preferences