The drop-down /select list functionality enables you to predefine input values for portlet input parameters. When a portlet requires that a user enter a value before receiving a result, the user can select one of several predefined values from a drop-down list.
There are four types of portlet input fields that you can convert to drop-down lists—text fields, password, select lists, and text area.
Creating a portlet drop-down/select list
This example creates a stock quote portlet with a drop down list that lets the user select from several stock symbols.
Start Web Studio by entering this URL in Internet Explorer 5.0 or later:
http://HOSTNAME.DOMAIN:8080/onepage/index.html
Enter your user name and password to log in.
Select Build | Portlets from the Web Studio left pane.
Click New on the Portlet Manager toolbar.
When the Portlet Builder displays, right-click anywhere in the window and select New Web Element. You see the Web Element Definition window.
Enter a beginning uniform resource locator (URL)—the Internet address—of the Web content you want to capture in the Location text field, then click Find. For this example, enter
http://finance.lycos.com/qc/default.aspx
When the Quote.com Web page displays, enter SY in the Symbol Lookup box and click Go. Stock quote information displays for Sybase.
Click Next in the New Web Element window.
Click the left mouse button on Sybase, Inc. below Quote.com, indicated by a shadow-box that trails the mouse arrow and says “Select it” and click Next.
Click the light blue button to the left of the first capture option. The button changes to a darker blue when you select it. Click Next.
You see the CGI parameters window. Complete these fields:
Variable – select this option next to the “symbols” name.
Display Name – enter Stock
Symbol
Default Value – a comma-separated list of the options you want to display in the drop-down list. For this example, enter:
SY,MSFT,ADSK,GE
Type – select Drop Down
Required – select this option.
Click Next.
Enter “Stock Quotes” for the element name, then click Finish. You return to the Portal Builder where the new element displays.
Click the down arrow beside the Preview button and select Playback. You see a preview of the portlet. Select the drop-down list to see the options you created.
Click Save to save the new portlet.
Changing items in a drop-down list
Select Build | Portlets from the Web Studio left pane.
Select the status of the portlet you want to edit, select the portlet in the detail view, and click Edit.
When the Portlet Builder displays, click Params. You see the first of several screens that allow you to edit the portlets input parameters. Follow the instructions on the screen.
Copyright © 2004. Sybase Inc. All rights reserved. |
![]() |