Get Social & Collaborate!
Tags
« Integrating Lotus Connections with WebSphere Portal - Part 2 | Main | New Domino Web Site - www.insurancefit.com.au »
Tuesday
Jul132010

Integrating Lotus Connections with WebSphere Portal - Part 1

I have been working with a client to integrate Lotus Connections 2.5 with WebSphere Portal (6.0 in this case). In doing so I have taken guidance from the posts of G.Muecke on the whoopdicity blog as well as the Lotus Connections Wiki however there seem to be some changes from when they were created with Connections 2.0 and I also have taken a slightly different approach on a couple of points.

What we want to achieve is the following:

1) When accessing Connections directly (ie without Portal) Connections has the normal Connections navigation. When you access Connections from within the Portal the Top Level of Connections navigation disappears and is effectively replaced by the Portal Navigation (1 page per Connections feature).

2) Initially we will use the Web Page Portlet to display each Connections feature on a separate page of the Portal.

3) We will then move to the preferred method of integration using the Web Application Integrator Portlet. The Web App Integrator is preferred because it removes the usage of iFrames (which is effectively what the Web Page Portlet does) and provides a more seemless user experience. However in using the Web App Integrator a bit of work needs to be done so it support a custom Portal Theme as well as a Double Top Navigation (and maybe even a 3rd level navigation sidebar).

So here we go...

Automagic disappearing Connections Top Level Navigation!

So the first thing we need to do is modify Connections so it can detect if the user has come to Connections directly or via the Portal. If direct then Connections navigation is used, if from Portal the Portal navigation will be used.

We do this by adding a parameter to the URL that is used to access Connections and then setting that parameter as a cookie. This cookie is then tested and if it exists we know to hide the Connections Nav.

The easiest way to hide/show the Connections top navigation bar is by using the fact that it's style is controlled by the "lotusbanner" style class. Each Connections feature has a header.html file (just do a search for header.html in each of the feature .ear file. eg [WASHOME]\profiles\lcprofile\installedApps\[YourCell]\files.ear). You need to add the following code:

<script type="text/javascript">
if(testCookieForFromPortal()) { document.getElementById("lotusBanner").style.display = "none";
}</script>

This code basically tests for the FromPortal cookie and if it is true sets the stle display ="none" which makes the Connections top level navigation banner disapear.

Now another approach which is a little nicer is rather than adding the code to the header.html file for every feature you can create the header.html on your IBM HTTP Server (IHS) and then this effectively overrights the header.html for each feature. You would have done this already if you have customised the Connections Logo or header at all as documented here. This is a much nicer way of doing it as you only need to maintain the code on the IHS rather than in each feature individually.

So once that is in place the next step is to add some script to every jsp in Connections that displays a page. This script will firstly set the cookie "FromPortal"=true if the URL has the "?FromPortal=true" parameter added to it. It will also test to see if the cookie has been set.

<script type="text/javascript">
if (("<c:out value='${param.FromPortal}'/>" != "true") && !testCookieForFromPortal()) { }
else
// if we get here, we have come from Portal, set a cookie
document.cookie="FromPortal=true; path=/";
}
function testCookieForFromPortal() {
if (getCookieValue("FromPortal") == "true")
{ return true; }
else
{ return false; }
}
function getCookieValue(cookieName) {
var retVal = "";
var i = document.cookie.indexOf(cookieName);
if (i != -1) {
var iVal = i + cookieName.length + 1;
var j = document.cookie.indexOf(";", iVal);
if (j < 0) retval = document.cookie.substring(ival);
else retval = document.cookie.substring(ival,j);
}
return retVal;
}
</script>

So here is a list of the jsp's it needs to be added to for each feature:

Homepage:

 \installedApps\Homepage.ear\dboard.war\web\jsp\about.jsp

 \installedApps\Homepage.ear\dboard.war\web\jsp\errorPage.jsp

 \installedApps\Homepage.ear\dboard.war\web\jsp\main.jsp

 \installedApps\Homepage.ear\dboard.war\web\toolsHomepage.jsp

 \installedApps\Homepage.ear\dboard.war\admin\admin.jsp

URL to link Web Page Portlet to: https://<homepage-server>/<homepage-context-root>/?FromPortal=true

 Profiles:

\installedApps\Profiles.ear\peoplpepages.war\WEB-INF\jsps\html\layouts\profiles1ColLayout.jsp

\installedApps\Profiles.ear\peoplpepages.war\WEB-INF\jsps\html\layouts\profiles2ColLayout.jsp

\installedApps\Profiles.ear\peoplpepages.war\WEB-INF\jsps\html\layouts\profiles3ColLayout.jsp

\installedApps\Profiles.ear\peoplpepages.war\WEB-INF\jsps\html\layouts\profiles1ColCenteredLayout.jsp

URL to link Web Page Portlet to: https://<profiles-server>/<profiles-context-root>/home.do?FromPortal=true

Communities:

\installedApps\Communities.ear\comm.web.war\WEB-INF\jsps\html\layouts\default.jsp

URL to link Web Page Portlet to: https://<communities-server>/<communities-context-root>/service/html/allcommunities?FromPortal=true

Search:

 \installedApps\Searchear\search.war\web\advancedSearch.jsp

 \installedApps\Searchear\search.war\web\errorPage.jsp

 \installedApps\Searchear\search.war\web\noIndex.jsp

 \installedApps\Searchear\search.war\web\searchResults.jsp

 \installedApps\Searchear\search.war\web\stats.jsp

 \installedApps\Searchear\search.war\web\toolsHomepage.jsp

Dogear:

\installedApps\Dogear.ear\dogear.webui.war\h3\jsp\main\h3.jsp

\installedApps\Dogear.ear\dogear.webui.war\h3\jsp\main\errorPage.jsp

\installedApps\Dogear.ear\dogear.webui.war\h3\jsp\tools\about.jsp

\installedApps\Dogear.ear\dogear.webui.war\h3\jsp\tools\toolbox.jsp (This was called h3_tools.jsp in Connections 2.0)

URL to link Web Page Portlet to: https://<dogear-server>/<dogear-context-root>/?FromPortal=true

 

 

So that is Home, Profiles, Communities, Bookmarks, and Search. I will post next about Blogs, Activities, Files and Wikis.....and then onto the Web Application Integrator Portlet.

<WAS_PROFILE_ROOT
 
\installedApps\<cellName
 
\Dogear.ear\dogear.webui.war\h3\jsp\main
<WAS_PROFILE_ROOT
 
\installedApps\<cellName
 
\Dogear.ear\dogear.webui.war\h3\jsp\tools

PrintView Printer Friendly Version

EmailEmail Article to Friend

References (7)

References allow you to track sources for this article, as well as articles that were written in response to this article.
  • Response
    Response: troops saluting
    Integrating Lotus Connections with WebSphere Portal - Part 1 - Blog - Adam Brown - Collaboration Blueprint
  • Response
    Response: cheltenhamservice
    Integrating Lotus Connections with WebSphere Portal - Part 1 - Blog - Adam Brown - Collaboration Blueprint
  • Response
    Integrating Lotus Connections with WebSphere Portal - Part 1 - Blog - Adam Brown - Collaboration Blueprint
  • Response
    Integrating Lotus Connections with WebSphere Portal - Part 1 - Blog - Adam Brown - Collaboration Blueprint
  • Response
    Response: Hay Day Cheats
    Integrating Lotus Connections with WebSphere Portal - Part 1 - Blog - Adam Brown - Collaboration Blueprint
  • Response
    Response: fun run cheats
    Integrating Lotus Connections with WebSphere Portal - Part 1 - Blog - Adam Brown - Collaboration Blueprint
  • Response
    Integrating Lotus Connections with WebSphere Portal - Part 1 - Blog - Adam Brown - Collaboration Blueprint

Reader Comments (3)

Fantastic!! Thanks for sharing!

July 15, 2010 | Unregistered Commenterluis benitez

Hi Brownie... does this apply to Connections 3 as well?

April 1, 2011 | Unregistered CommenterParag Desai

Hi Parag,

It should. There will be some changes to it but in principle it will work the same. I am doing a client upgrade to Connections 3 over the next week where we will be doing exactly this so I will try and repost with any changes to the process.

Cheers

Adam

April 1, 2011 | Registered CommenterAdam Brown

PostPost a New Comment

Enter your information below to add a new comment.
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.