heidloff.net - Building is my Passion
Post
Cancel

Use XPages in the Embedded Experience of IBM's Social Business Toolkit

In my last blog entry I wrote how entries from the activity stream of the IBM Social Business Toolkit can be displayed in XPages. Today I show how to use an XPage to display an activity stream entry in the embedded experience.

There are several scenarios where this is important. For example teamrooms could put notifications about new documents that you need to review or new comments to your documents in the activity stream. In the activity stream users should then be able to open these documents or at least summaries with links in the embedded experience.

In order to put entries in the activity stream programmatically I’d like to create another sample. For now I simply used the REST API test application.

In order to tell the embedded experience which gadget to open I had to use these parameters as alternate inline and type:
{“ee:component-instance-data”:{“ee:context”:”{“bookmarkTitle”:”Niklas”,”bookmarkURL”:”http://heidloff.net”}”,”ee:component-definition”:”http://heidloff.net/social.nsf/gadget.xsp?documentId=4a4c53c70bb45b36002578560052d9ae”}}
application/gadget-instance+json

image

First I had to create my XPage to display the actual document. Then I created a second XPage (XPage agent) that emits the gadget definition pointing to the actual document XPage. This definition is expected by the social gadget container. I’ve created the simplest possible form that just points to the document XPage that will then be rendered in an iFrame. In order to identify the actual document the document unid is passed to the gadget XPage and then put dynamically in the gadget xml.

After you’ve done this your XPage shows up in the embedded experience. I’ve uploaded a bigger screenshot to OpenNTF.

image

Featured Blog Posts
Disclaimer
The postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions.
Trending Tags