| < Day Day Up > |
|
One way to better integrate Domino with the prepackaged portlets from WebSphere Portal is to modify your existing Domino data to use the RSS and the XML/XSL helper portlets.
Examples in this option utilize eXtensible Markup Language (XML). XML is a set of rules for defining tags that break documents into parts. XML is useful because you can create tags. While these tags follow certain general principles, the meaning can be very flexible. Domino has supported XML since 1999. Document Type Definitions (DTDs) are repositories of these tags that make up a document. Domino uses a DTD to document the XML that Domino produces. It is also relatively easy to get XML data from Domino. You might already have a view that can be used, or you may have to create one. You can pass the tags that XML uses through view columns.
eXtensible Stylesheet Language: Transformations (XSLT) is a language designed to transform XML into another format. It also can be used to transform XML into HTML.
The Rich Site Summary (RSS) news format is a simple, common format for delivering news to portals and other Web sites. The RSS Portlet renders XML data that conforms to the RSS DTD. However, it can be easily configured to render any XML data using any XSLT stylesheet.
An alternative to configuring the RSS portlet is to go get the XML from Domino and format it for presentation. This set of methods produces portlets by simply modifying your Domino application to serve up XML to the XML/XSL helper portlet. The style sheet used to render the view creates an HTML table out of the Domino XML (DXL) resulting from a ReadViewEntries request to the Domino database. Each <viewentry> template creates a new row in the table. Each <entrydata> template creates a new cell in the row. For simplicity, the entrydata template assumes that it has a text child element. This can be accomplished by passing the PreFormat option to ReadViewEntries.
The RSS portlet only allows a single, static URL to be specified when the portlet is configured. The XML/XSL helper portlet utilizes the same technology. As an effective integration technique, these portlets are considerably reduced because of this specified static URL.
Applicable portlet patterns | Link, Display - Display portal patterns using a very small data set can be implemented using this technique. |
Development time | Moderate |
Developer skill set | WebSphere Portal administration skills are needed. Domino developer skills with experience with JavaScript, XML, and XSLT are needed. |
Range of applications | Moderate |
Handle rich text | If a connection is made to the Domino HTTP server directly (out of the portlet context) then Rich Text is shown, otherwise no. |
Performance | Limited |
Session Management | No |
Clustering | No |
Scalability | No |
Requires single sign-on | Depending on the application, the RSS portlet or copies can be configured to use single sign-on. |
Required software versions | Standard HTML browsers with JavaScript support are required. Netscape 5 and above and Internet Explorer 4 and above are supported. |
This section describes how we configured a portlet page with Domino view data using copies of the RSS portlet, added elements to a Domino design to enhance the presentation, and configured our modified RSS portlets to display this data. To fully explain this implementation, we provide complete details concerning:
Domino enhancements
Portal configuration options
Results
To see the design elements in detail, access the accompanying Domino databases. For the first RSS portlet, Customer Contacts RSS Portlet, we generated a new view, ContactsRSSbyName in the customer database. We had XML with a hardcoded URL link to a view column, which is presented in our portlet. This column code formula is shown in Figure 3-32.
Figure 3-32: ContactsRSSbyName view
We added a view template, $$ViewTemplate for ContactsRSSbyName form in the database. This form incorporates XML as well as an embedded view containing the ContactsRSSbyName view. This is shown in Figure 3-33.
Figure 3-33: Creation of a $$ViewTemplate for the ContactsRSSbyName view
For the Customer Contacts RSS Portlet portlet, we styled the sheet with the generic XSLT that is included with WebSphere Portal.
For the Customers XML-XSLT portlet, we used the CustomersByName view shown in Figure 3-35 on page 112.
Figure 3-34: CustomersByName view in the Customers database
We wanted to present the view in our own style. We generated an XSLT stylesheet, naming the stylesheet Customers.XSL and placing it as a form in the Customers database. Figure 3-35 on page 112 shows this stylesheet.
Figure 3-35: Customers.XSL stylesheet form in the Customers database
For more information on using XSLT and XML inside Domino, see the Lotus Domino Designer® 6 Help database or the IBM Redbook Lotus Domino Designer 6: A Developer's Handbook, SG24-6854.
To construct portlets, in the portal environment click Portal Administration → Manage Portlets. This page is shown in Figure 3-36.
Figure 3-36: The Manage Portlets page under Portal Administration
Navigating down the Portlets scroll bar you find the RSS Portlet entry shown in Figure 3-37.
Figure 3-37: Copying the RSS Portlet
Highlight this entry and click the Copy icon from the actions on the right side of the page. The script prompt dialog box pops up and requests the name of the new "copied" portlet. Figure 3-38 shows this prompt.
Figure 3-38: Prompt for name of the copied portlet
Enter a name for the copy and click OK; we entered Customer Contacts RSS Portlet. Clicking the OK button adds the portlet to the Portlets area. Scroll through the available portlets and find your newly copied portlet. You will notice that it is Inactive. Highlight this entry and click the Modify Parameters icon from the actions on the right side of the page. The configuration page for this new portlet is displayed, as shown in Figure 3-39.
Figure 3-39: Configuration screen for the Customer Contact RSS portlet
Click Save to save the settings and exit the configuration screen. Click Cancel to exit the configuration page without saving any information. There are two sections on this configuration page, Edit Parameters and Edit Locale Specific Titles. The Edit Parameters section is shown in Figure 3-40.
Figure 3-40: Edit Parameters section
Details for the parameters shown are:
Edit Parameters:
Adding a parameter: To add a parameter, enter the parameter name in the text box below Parameter. To add the corresponding value, enter the value in the text box below Value and then click Add.
Deleting a parameter: To delete parameters, mark the checkboxes to the left of each parameter you would like to delete. When finished, click Delete. A confirmation dialog appears. Click OK to delete the parameter. Click Cancel to keep the parameter.
Our configuration values are listed in Table 3-11.
Field | Inserted value |
---|---|
stylesheet wml (using the WP built-in default) | /WEB-INF/xsl/wml/rss.xsl (default) |
stylesheet html (using the WP built-in default) | /WEB-INF/xsl/html/rss.xsl (default) |
URL (this is the view that we generated in Domino) | http://itsotest-dom:8088/apps/CUSTOMER.NSF/ContactsRSSbyName?openview&count=9999 |
itemDisplayed | 10000 (records to show) |
Edit Locale Specific Titles:
To set local titles, click a locale in the Edit Locale Specific Titles area. Click the Set title for selected locale icon to display the title page as shown in Figure 3-41 on page 117. After entering your title, click OK. Click Close to exit this page without saving any information.
Figure 3-41: Setting the title for selected locale
Click OK on the bottom of this edit screen to complete the configuration and return to display mode. If you click Previous on this edit screen instead, you will return to the first edit screen. Clicking Cancel will exit the edit screens without saving any configuration changes.
After saving the modifications to the Customer Contacts RSS Portlet, activate the portlet. Highlight the portlet and click the Active/Deactivate icon from the actions on the right side of the page. This activates the inactive portlet.
Follow similar instructions for the second portlet in this example, the Customers XML-XSLT portlet. Again highlight the RSS portlet in the Portlets area and click Copy. Type in the new name and clicking OK. Highlight this inactive portlet and click Modify Parameters. In the lab we entered the values shown in Table 3-12 into the parameter list, and our title in the English locale.
Field | Inserted value |
---|---|
stylesheet wml (this is the customer.xsl form we built in Domino) | http://itsotest-dom:8088/apps/CUSTOMER.NSF/customers.xsl?readform |
stylesheet html (this is the customer.xsl form we built in Domino) | http://itsotest-dom:8088/apps/CUSTOMER.NSF/customers.xsl?readform |
URL (this is generating XML from the customersbyname view from Domino) | http://itsotest-dom:8088/apps/CUSTOMER.NSF/customersbyname?readviewentries&count=1000 |
itemDisplayed | 8 (records to show) |
The result of our actions is shown in Figure 3-42.
Figure 3-42: Configuration screen for Customers XML-XSLT portlet
After saving the modifications to the Customers XML-XSLT portlet, activate the portlet. Highlight the portlet and click the Active/Deactivate icon from the actions on the right side of the page. This will activate the inactive portlet.
We have created a page and placed the Customer Contacts RSS portlet and the Customers XML-XSLT portlet on this page and have activated the page. Figure 3-43 on page 119 shows the XML portlets page.
Figure 3-43: XML portlet page
Clicking the first entry in the Customer Contacts - Using RSS portlet results in the screen shown in Figure 3-44.
Figure 3-44: Result of clicking a highlighted link in the RSS portlet
Notice that clicking on the document link brought up a new browser window. If you close this window and click the first entry in the Customers XML-XSLT portlet, again, a new browser window is opened. The result is shown in Figure 3-45.
Figure 3-45: Clicking on a highlighted link in the XML/XSL portlet
| < Day Day Up > |
|