Portlet Adapter Builder
In this topic ...
Related Topics ...
The Portlet Adapter builder allows you to set a portlet title and description, and to expose profile values for customization when the model is used as a portlet.
This builder supports WebSphere Portlet Factory's Portlet Adapters. When using this builder in a JSR 168 setting, be aware that some of the builder inputs might not apply. For example, in a JSR 168-compliant portal Configuration mode is optional. Thus builder inputs related to portlet configuration might not apply to portlets destined for use in a JSR 168 environment that does not enable configuration.
Specifying Inputs
The Portlet Adapter builder takes the inputs described in the table below. For help on inputs common to many or all builders such as those in the Properties and HTML Attributes input groups, see Using the Builder Call Editor.
Input Name Description Name Enter a name for this builder call. The Designer displays this name in the Builder Call List. Portlet Title Enter a name that will identify this portlet when it gets added to a page in the portal. This name is also used when other portlets communicate directly to this portlet. Portlet Short Title Enter a name that will identify this portlet for Portals and Portlet Containers that support the Java Standard Portlet (JSR168)<short-title> portlet.xml element. Portlet Keywords Enter a comma separated list of keywords describing this portlet. Portlet Description Enter a short description for the portlet. This description is used to describe the portlet when it is getting added to a page in a portal. Default Locale Enter the Default Locale (eg, en_US ) for this portlet. Defaults to "en" if not set. For Java Standard (JSR168) portlets, used to set the initial <supported-locale> portlet.xml element. Also used as the suffix on the resource bundle generated for Java Standard (JSR168) portlets (eg, WEB-INF/classes/nls/myportlet_en.properties ). User Help File Enter the URL (absolute or relative) to an HTML file that displays help for all of the editable aspects of the portlet. Profile Sets Profile Sets Determines how profile sets and profile entries get exposed in the Edit and Configure modes of the portlet. For each profile set associated with the portlet model, the builder call editor for the Portlet Adapter builder displays its name as the prompt for a selectable input with five options:
- Do not expose in Portal tools -- Prevents any exposure of its name or profile values in the Configure, Edit Defaults and Edit modes of the portlet. Use this setting when you want the Factory s profile selection handler to determine the profile to apply to the portlet s underlying model.
- Show individual profile values in Edit and Edit Defaults -- Allows the user to specify values for each entry in the profile set when in the Edit mode (Personalize) or Edit Defaults mode (Shared Settngs) for the portlet. Use this setting to allow the user to set portlet parameters at execution time. For example, a stock-symbol list, zip-code for weather, background color, etc.
- Show profile names in Edit and Edit Defaults -- Allows the user to specify a profile to apply to the portlet. Use this setting to allow the user to apply all the values determined by the selected profile to the portlet. For example, a profile set could contain profiles oriented towards the user s region. Using this setting on such a profile set allows the user to determine the regional profile to use, but the developer retains control over the individual values in that profile.
- Show individual profile values in Edit Defaults -- Allows the user to specify values for each entry in the profile set when in the Edit Defaults mode (Shared Settngs) for the portlet. Use this setting to allow the user to set portlet parameters at execution time. For example, a stock-symbol list, zip-code for weather, background color, etc.
- Show profile names in Edit Defaults -- Allows the user to specify a profile to apply to the portlet. Use this setting to allow the user to apply all the values determined by the selected profile to the portlet. For example, a profile set could contain profiles oriented towards the user s region. Using this setting on such a profile set allows the user to determine the regional profile to use, but the developer retains control over the individual values in that profile.
- Show individual profile values in Configure -- Allows the portal administrator to specify values for each entry in the profile set when in the Configure mode for the portlet. Use this setting to allow the portal administrator to set portlet parameters when they add the portlet to a page. These settings apply to all the users of the portal.
- Show profile names in Configure -- Allows the portal administrator to specify a profile to apply to the portlet. Use this setting to allow the portal administrator to apply all the values determined by the selected profile to the portlet. These settings apply to all the users of the portal.
Note that Some portal servers do not support the "Configure Mode" for JSR-168 portlets.
Composite Application Parameters Composite Application Parameters Use the checkbox next to each profile set in the model to indicate whether it should be exposed as an application parameter for composite applications in WebSphere Portal. For more information about composite applications and parameters, see the topic Composite applications in the WebSphere Portal Information Center. Edit and Configure Settings Custom Edit Type To override the look and feel of the portlet's Edit mode, choose one of the following options:
- Imported Page -- To add content to the default Edit page, select this option.
- Custom Model -- Select this option if you want control over the UI elements used to set values or some other functionality not provided by simply creating a different HTML page.
Depending on the option you choose, the builder call editor displays either the Portlet Edit Page to Import or Custom Edit Model input.
Custom Edit Defaults Type To override the look and feel of the portlet's Edit Defaults mode (shown as Edit Shared Settings in WebSphere Portal 6), choose one of the following options:
- Imported Page -- To add content to the default Edit Defaults page, select this option.
- Custom Model -- Select this option if you want control over the UI elements used to set values or some other functionality not provided by simply creating a different HTML page.
Depending on the option you choose, the builder call editor displays either the Portlet Edit Defaults Page to Import or Custom Edit Defaults Model input.
Custom Configure Type To override the look and feel of the portlet's Configure mode, choose one of the following options:
- Imported Page -- To add content to the default Configure page, select this option.
- Custom Model -- Select this option if you want control over the UI elements used to set values or some other functionality not provided by simply creating a different HTML page.
Depending on the option you choose, the builder call editor displays either the Portlet Configure Page to Import or Custom Configure Model input.
Portlet Edit Page to Import Enter the URL to the HTML file that defines the look and feel for the Edit page that is displayed when the user selects Edit or Personalize from the portlet's title bar. On this page there must be an HTML form with code that looks exactly like the following:
<form> <table cellpadding="3" align="left"> <tr name="repeat"> <td> <span name="entry_prompt"></span> </td><td> <span name="entry_value"></span> </td> </tr> <tr> <td colspan="2"><input name="submitbutton"></td> </tr> </table> </form>
The display elements (cellpadding, border, etc) may be altered but the name of the elements (entry_prompt, entry_value, etc) cannot.
Portlet Edit Defaults Page to Import Enter the URL to the HTML file that defines the look and feel for the Edit Defaults page that is displayed when the user selects Edit Defaults or Edit Shared Settings from the portlet's title bar. On this page there must be an HTML form with code that looks exactly like the following:
<form> <table cellpadding="3" align="left"> <tr name="repeat"> <td> <span name="entry_prompt"></span> </td><td> <span name="entry_value"></span> </td> </tr> <tr> <td colspan="2"><input name="submitbutton"></td> </tr> </table> </form>
The display elements (cellpadding, border, etc) may be altered but the name of the elements (entry_prompt, entry_value, etc) cannot.
Portlet Configure Page to Import Enter the URL to the HTML file that defines the look and feel for the Configure page that is displayed when the user selects Configure from the portlet's title bar. On this page there must be an HTML form with code that looks exactly like the following:
<form> <table cellpadding="3" align="left"> <tr name="repeat"> <td> <span name="entry_prompt"></span> </td><td> <span name="entry_value"></span> </td> </tr> <tr> <td colspan="2"><input name="submitbutton"></td> </tr> </table> </form>
The display elements (cellpadding, border, etc) may be altered but the name of the elements (entry_prompt, entry_value, etc) cannot.
Custom Edit Model Enter the path and name of the model that implements the portlet's Edit mode. This model replaces the default edit page model. By replacing the default edit model for this portlet, this custom model is required for the presentation of and processing of values presented during the edit or personalize phase.
Also note used to the Portlet Customizer builder to create a configure and edit page model for your portlet.
Custom Edit Defaults Model Enter the path and name of the model that implements the portlet's Edit Defaults mode. This model replaces the default edit defaults model. By replacing the default edit defaults model for this portlet, this custom model is required for the presentation of and processing of values presented during the edit defaults (also known as edit shared settings) phase.
Also note used to the Portlet Customizer builder to create a configure and edit page model for your portlet.
Custom Configure Model Enter the path and name of the model that implements the portlet's Configure mode. This model replaces the default configure page model. By replacing the default configure model for this portlet, this custom model is required for the presentation of and processing of values presented during the configure phase.
Also note used to the Portlet Customizer builder to create a configure and edit page model for your portlet.
Requires Configuration Enable this checkbox if the user must configure the model before using it in a portal. Advanced Preferences Specify any additional, optional Java standard portlet preferences as name/value pairs. We can specify multiple values for each preference name. Preferences marked as Read Only can be changed only by an administrator (Configure mode). These preferences are included in the generated portlet.xml for that project's portlet WAR. For example, if you enter a single preference name
dried_fruit
and the valuesraisins
,dates
,prunes
, the generated portlet descriptor would include...<portlet-preferences> <preference> <name>dried_fruit</name> <value>raisins</value> <value>dates</value> <value>prunes</value> </preference> </portlet-preferences>