AquaLogic User Interaction Development Guide

     Previous Next  Open TOC in new window   View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Portlet Settings Development Tips

These tips and best practices apply to all portlets that access settings.

Enter all preference and configuration pages used by a portlet in the Web Service editor. You must enter the URL to any preference pages in the Web Service editor on the Preferences page. You must enter the URL to any configuration pages in the Web Service editor on the Advanced URLs page.
Enter all User settings and Community Settings required by a portlet in the Preference list in the Web Service editor. If a shared setting is not entered in this list, it will not be available to the portlet.
Gateway all pages that store settings in the portal. To store settings on the portal, preference pages must be included in the Gateway Prefixes List, configured in the Web Service editor on the HTTP Configuration page. For instructions on entering gateway prefixes, see the portal online help.
Never send query string or form variables directly to the My Page. Always use a separate page to set and remove settings. Sending query string or form variables directly to the portal page is unreliable and can result in seemingly random errors. Your code will not have access to these variables in most cases, because it might be preceded by other code on the portal page.
Do not use session preferences for shared settings; portlets on the same portal page and the same remote server cannot use the same session. To implement shared settings, you must use the Application object, store User settings in the ALI database, or use the Portlet Communication Component (PCC).
Return the user to the location of the portlet on the page when redirecting from a preferences page to a portal page. This can be done using the IDK IPortletResponse.ReturnToPortal method.
Always include a link to the correct settings page within the portlet display. It might not be clear to users where they should enter settings for a portlet. If the portlet requires configuration, include a link to the appropriate preference page or configuration page within the portlet display.
Always use popup windows for preference pages. Use the following guidelines for all popup windows.
  • The portal window must remain open. Do not redirect the portal window to the destination URL.
  • The popup window should regain focus on any successive click-through. If the user leaves the window open and then clicks the same link, the same popup window should regain focus (instead of opening a new window).
  • The popup window should close if the portal window is closed. If the user closes the portal window, any associated popup windows should close automatically.
  • The popup window should appear in the style of the portal. You can reference the stylesheet in any gatewayed page by using the pt:Stylesheets tag as shown in the code snippet below. For details on adaptive tags, see About Adaptive Tags.
    <%@ page language="java" import="com.plumtree.remote.portlet.*" %>
    <pt:styleSheets xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/'/>
    <div class=platportletHeaderBg>The background here is <i>platportletHeaderBg</i>. <span class=platportletWideHeader>This adds the font style <i>platportletWideHeader</i> from the portal stylesheet.</span></div>
    <p><input type=button class=inputBox value="This button uses the inputBox style">
    ...

There are some additional considerations if the data stored by a portlet should be secure; for details, see About ALI Portlet Security.


  Back to Top      Previous Next