Portlet properties  Portlet labels

Chapter 4: Building Portlets

Portlet parameters

The parameters identified for an element can be configured during portlet creation in one of the element definition windows or after portlet creation using the Portlet Builder Configure Parameter wizard. You launch the wizard by clicking the Params button on the Portlet Builder toolbar.

Web Studio allows you to identify or create portlet parameters that control the portlet content. These can be CGI script parameters for Web elements or custom @OP parameters for XML and database elements. You can specify these parameters as variables, which causes the portlet to display input fields during playback. End users can submit their own parameter values into these input fields to return personalized content.


CGI parameters

A CGI program, or script, is a way users interact dynamically with Web pages; for example, submitting a string to a search form. When parameters are submitted to a CGI script to navigate to the Web page, the program automatically detects these parameters and their values. You can designate one or more CGI parameters as variables. Portlets with variable parameters display a window containing input fields for these parameters before portlet content is rendered. This allows portal users to submit their own parameter values to return personalized content.

When the element contains data-capable parameters, a window displays during the element creation process that displays all parameters that you can designate as variables.

In addition to specifying variables for an element, you can also select a personalization adapter to use with the parameters. You can select the username and password parameters as variables, then select the personalization username/password login adapter. The Key represents the value that a user needs to enter.

Users can use the My Info link in Portal Interface to personalize the values for these input fields so that they can always log in using their own user name and password. See “Using the user name/password adapter” for more information.

Whether you access the parameter configuration windows during portlet creation or by clicking Params, you can edit the following parameter properties.

NoteThe parameter options display in a different order and on more than one screen when you click Params to access the Configure Parameters window. The order shown here is how the parameter options display during portlet creation.


@OP parameters

You can insert an @OP parameter into the SQL query of a database. This dynamically modifies the query string submitted to the database.

StepsInserting @OP parameters

  1. Create a new database element:

  2. When the Portlet Builder appears, right-click in either frame and select New Database Element from the pop-up. You can also click the down arrow next to the Add icon and select Database Element.

  3. Complete the Database Element Definition:

    NoteThis example uses an Adaptive Server database Enterprise.

  4. Select the Variable option next to the Header parameter and enter “%CNN%'” into the Default Value input field.

  5. Click Next in the upper-right corner.

  6. Enter an element name such as “DB Search” and click Finish.

  7. In the Portlet Builder, click Save to display the Portlet Save window.

  8. Complete the fields and click OK.

  9. Click Finish in the upper-right corner. You should see a pop-up that displays “Portlet saved successfully.”

  10. Click OK to close the window, then click Close in the upper-right corner.





Copyright © 2004. Sybase Inc. All rights reserved. Portlet labels

View this book as PDF