Let’s build a web application using IBM Sametime and the newly released IBM Script Portlet for WebSphere Portal.
IBM Sametime integrates with WebSphere Portal already, and there’s ample documentation in the Knowledge Base on configuring the two products. But assume you either want to quickly build upon the existing integration or forego the tight integration for a more ad hoc application approach. To do this, I’ll use the Sametime Proxy samples (stproxy), which provides a rich client-side API – perfect for a web application.
This is a basic web sample straight from the SDK.
What’s going on in this code? First, there are two configuration that get created in the head tag of the page. Next, two script includes are loaded. The include.js file will use the configuration objects – so order is important. And finally, the div specifies where to render the Sametime component, which is the web client.
Using the new script portlet, you might create an application by plugging in the respective components.
This won’t work (besides the need to specify actual servers and remove the JSP scriptlet). The reason this won’t work is due to how the script portlet emits the final markup. To see this, you can review the WCM presentation template.
My point in detailing this is that you should understand what the script portlet does with the web artifacts. You can then either refactor your code to accommodate or even create a new presentation template to re-order the emitted markup. The latter is the value of using WCM. I chose to simply refactor code. The final version looks like this.
Now you can build Sametime widgets with just a bit or markup.