Tuesday, 19 October 2010

Lotus Connections 2.5 - Changing the way in which URLs are handled in the Homepage

One of our partners has a requirement to integrate Lotus Connections 2.5 into WebSphere Portal, using the Web Application Integrator portlets.

As part of this, they want to force any links opened from within the various widgets to open in the same, rather than a new page/window/tab. In this way, they can use WAI across all of the Connections features and preserve the Portal navigation.

With a lot of help from Adrian Spender, who leads the IBM Dublin development team responsible for the Homepage and aggregation services, I was able to come up with a solution.

In my own environment, I chose to focus on the Communities widget that appears within the My Page subpage of Homepage (!).

The links that this iWidget generate are controlled by an Extensible Stylesheet Language Transformations (XSLT) file which, for Homepage, is located here: -

/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/lc25Node01Cell/Homepage.ear/dboard.war/xslt

The XSL file ( communities.xsl ) contains the following two snippets: -

...
<xsl:template name="entries" match="/atom:feed">
                <xsl:for-each select="atom:entry">
                <div class="entry">
                        <div class="icons">
                                <a target="_blank">
                                        <xsl:attribute name="href">
...

and: -

...
   <h4>
                                <a target="_blank">
                                                <xsl:attribute name="href">
                                                        <xsl:value-of select="atom:link[@rel='alternate']/@href" />
                                                </xsl:attribute>
...

Having backed up the file, it's then a simple matter to replace: -

<a target="_blank">

with: -

<a>

and save the file.

Once this is done, I restarted WAS to clear down any cached copies of the XSL ( in my case, I found it necessary to restart the entire cluster, and clear down /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/temp/ and /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/wstemp/ as well as clearing my browser cache ).

Once Connections was restarted, I logged back into Homepage, and confirmed that, when I click on a Community name under Communities -> My Communities, that the Community itself opened up in the SAME rather than a NEW page.

Again, credit to Adrian for his advice :-)

No comments:

Note to self - use kubectl to query images in a pod or deployment

In both cases, we use JSON ... For a deployment, we can do this: - kubectl get deployment foobar --namespace snafu --output jsonpath="{...