Skip Headers
Oracle® Application Server Portal Developer's Guide
10g Release 2 (10.1.4)
B14135-02
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

3 Creating Portlets with OmniPortlet

This chapter provides an overview of OmniPortlet and explains the user interface elements associated with OmniPortlet. This chapter contains the following sections:

For information on using OmniPortlet to build example portlets, refer to Chapter 4, "Building Example Portlets with OmniPortlet". For troubleshooting information regarding OmniPortlet, refer to Section B.3, "Diagnosing OmniPortlet Problems". For information on registering and configuring OmniPortlet with Oracle Application Server Portal, refer to Appendix I, "Configuring the Portal Tools Providers" in the Oracle Application Server Portal Configuration Guide.

3.1 What is OmniPortlet?

OmniPortlet is a subcomponent of Oracle Application Server Portal that enables page designers and developers to easily publish data from various data sources using a variety of layouts. You can base an OmniPortlet on almost any kind of data source, such as a spreadsheet (character-separated values), XML, and even application data from an existing Web page.


Note:

You can find more information about developing different types of portlets in Chapter 1, "Understanding Portlets", and information about providers and other portlet technologies in Chapter 2, "Portlet Technologies Matrix".

OmniPortlet enables page designers and content contributors to:

To display personalized data, you can refine the retrieved data by filtering the results returned from a data source, and parameterize the credential information used to access secure data. Out of the box, OmniPortlet provides the most common layout for portlets: tabular, chart, HTML, news, bulleted list, and form.


Note:

To use OmniPortlet, the Simple Parameter Form, or the Web Clipping portlet, you must use Netscape 7.0 or higher, or Microsoft Internet Explorer 5.5 or higher for Windows 2000.

OmniPortlet is provided with Oracle Application Server 10g; you can add an OmniPortlet from the OracleAS Portal Repository in the Portlet Builders folder. If you've downloaded OmniPortlet as part of the Oracle Application Server Portal Developer Kit, you must register it before you can use it. To learn more about registering a Web provider, refer to the Oracle Application Server Portal Configuration Guide, located on the OracleAS Portal Documentation page on OTN (http://www.oracle.com/technology/products/ias/portal/documentation.html). You can then add an OmniPortlet to any portal page.

More on OTN

You can find more information about building portal pages in the Oracle Application Server Portal User's Guide on the OracleAS Portal Documentation page on OTN. You can also upgrade to later releases of OmniPortlet from the Portlet Development page on OTN (http://www.oracle.com/technology/products/ias/portal/) as part of the Oracle Application Server Portal Developer Kit (PDK).

Instructions for installing, configuring, and registering the OmniPortlet provider are provided within the pdksoftware.zip file containing the PDK-Java and Portal Tools. For specific information on configuring OmniPortlet, refer to Appendix I, "Configuring the Portal Tools Providers" in the Oracle Application Server Portal Configuration Guide.

3.2 The OmniPortlet Wizard

The OmniPortlet Wizard initially contains six steps. When you first define your OmniPortlet, you set the data source type, data source options, filter options, view options, and layout. When you've completed these steps of the wizard, you can re-enter the wizard by clicking Edit Defaults for the portlet. When you re-enter the wizard, you can change the definitions on the Source, Filter, View, and Layout tabs, as well as set up the event parameters on the Events tab.

This section provides a high-level overview of the six tabs (see the following table). You can also find information in the online Help (accessible by clicking the Help link in the product), which describes the options on each tab.

Table 3-1 OmniPortlet Wizard and Edit Defaults

Step/Tab Description

Type


Provides your data source options. Displays only in the initial definition of the portlet, and is not available when editing the defaults of the portlet.

Source


Provides the options for the selected data source, such as the URL of the Web Service you wish to use. You can change these options later when editing the defaults of the portlet.

Filter


Provides sorting options at the OracleAS Portal level to enable you to refine your results. You can change these options later when editing the defaults of the portlet.

View


Provides options for displaying portlet header and footer text, the layout style, and caching. You can change these options later when editing the defaults of the portlet.

Layout


Provides detailed options for customizing the layout. You can change these options later when editing the defaults of the portlet.

Events


Does not display in the initial definition of the portlet. Provides options for adding events to the portlet. Displays only after the portlet has been defined in the Edit Defaults mode of the wizard.


3.2.1 Type

Figure 3-1 Type Tab of the OmniPortlet Wizard

Shows Type tab of OmniPortlet.
Description of "Figure 3-1 Type Tab of the OmniPortlet Wizard"


Note:

If you've downloaded and installed an additional data source, the data source will display on the Type tab.

When you first launch OmniPortlet, the Type step displays, which enables you to choose your data source. Out of the box, OmniPortlet supports the following data sources:

Table 3-2 Supported Data Source Types

Data Source Type Description

Spreadsheet

Displays data from a text file containing character-separated values (CSV).

SQL

Displays data from a database using SQL.

XML

Displays data from an XML file.

Web Service

Displays data from a discrete business service that can be accessed over the Internet using standard protocols.

Web Page

Displays data based on existing Web content.

J2EE Connector Architecture*

(Displays only if the Sample Provider is registered with OracleAS Portal). A J2EEtm Connector Architecture (JCA) 1.0 adapter is also available. JCA provides a mechanism to store and retrieve enterprise data such as that held in ERP systems (Oracle Financials, SAP, PeopleSoft, and so on).


After you complete the OmniPortlet Wizard and edit the defaults of the portlet, you cannot change the data source type.

3.2.2 Source

After you've chosen your data source type, the Source step of the OmniPortlet Wizard displays. This step adapts to the data source you've chosen, to enable you to specify the options offered by that data source. The Source tab contains a Proxy Authentication section if the OmniPortlet provider has been configured to use a proxy server requiring authentication, and a Connection section where you can provide the necessary information for connecting to the data source.

This section contains information about the two common areas on the Source tab:

Later, this section also describes the portion of the Source tab specific to each data source.


Note:

For more information on the Source tab options, click Help in the upper right corner of the page.

3.2.2.1 Proxy Authentication

OmniPortlet supports proxy authentication, including support for global proxy authentication and per-user authentication. You can specify whether all users will automatically log in using a user name and password you provide, each user will log in using an individual user name and password, or all users will log in using a specified user name and password. If the OmniPortlet provider has been set up to use proxy authentication that requires your login, a Proxy Authentication section displays on the Source tab where you can enter this information.

The Proxy Authentication section only displays for the data sources that may require you to use a proxy server to access them: CSV (character-separated values), XML, Web Service, and Web Page. For more information on configuring the OmniPortlet provider to use proxy authentication, see the online Help topic that displays when you click Help on the Edit Providers: OmniPortlet Provider page. If the OmniPortlet provider is configured to "Require login for all users," each user must set his or her own login information: - For page designers, set this in Edit Defaults: Source tab. - For page viewers, set this on the Personalize screen.

You can also find more information on configuring OmniPortlet in Appendix I, "Configuring the Portal Tools Providers" in the Oracle Application Server Portal Configuration Guide, available on the OracleAS Portal Documentation page on OTN.


Note:

If you are using the Web Page data source, the Proxy Authentication section displays in the Web Clipping Studio, after you have clicked the Select Web Page button on the Source tab.

3.2.2.2 Connection Information

For each data source except the Web Page data source, the Source step contains a Connection section, where you can define the connection information to access secured data. The Source step for all data sources include a Portlet Parameters section, where you can define the parameters for the portlet. You can then map the portlet parameters to the page-level parameters.

Figure 3-2 Source Tab: Connection and Portlet Parameters Section

Shows Source tab of OmniPortlet.
Description of "Figure 3-2 Source Tab: Connection and Portlet Parameters Section"

To edit the connection information, click the Edit Connection button and fill out the information on the page shown in Figure 3-3. On this page, you can enter a name for the connection information, as well as the username and password. For the SQL data source, you can enter more information to specify the driver you wish to use to connect to the data source. For more information, refer to Section 3.2.2.4, "SQL".

Figure 3-3 Edit Connection Page

Description of Figure 3-3  follows
Description of "Figure 3-3 Edit Connection Page"


Note:

For more information about the Connection section and the Edit Connection button, click Help on the Source tab of the OmniPortlet wizard.

3.2.2.3 Spreadsheet

Spreadsheets are a common method of storing small data sets. OmniPortlet enables you to share spreadsheets by supporting character-separated values (CSV) as a data source. On the Source tab, you specify the location of the CSV file. If the file is located on a secure server, you can specify the connection information in the Connection section described in Figure 3-2. You can also select the character set to use when OracleAS Portal reads the file, as well as the delimiter and text qualifier.

Since the OmniPortlet provider exists and executes in a tier different from the OracleAS Portal application and does not have access to the OracleAS Portal session information, you must expose CSV files that are uploaded to OracleAS Portal as PUBLIC in order for OmniPortlet to access them.


Note:

For more information on using the CSV data source, refer to Section 4.3, "Building an OmniPortlet Based on a Spreadsheet (CSV)".

Figure 3-4 Source Tab: Spreadsheet

Shows Spreadsheet source tab.
Description of "Figure 3-4 Source Tab: Spreadsheet"

3.2.2.4 SQL

The relational database is the most common place to store data. OmniPortlet enables you to use standard JDBC drivers and provides out-of-the-box access to Oracle and any JDBC database. You can specify the driver type when you configure the connection information.

Figure 3-5 Source Tab: SQL

Shows SQL Source tab.
Description of "Figure 3-5 Source Tab: SQL"

3.2.2.4.1 SQL Connection Information

You can also use the DataDirect JDBC drivers to access other relational databases. To configure OmniPortlet to use these drivers, refer to Appendix I, "Configuring the Portal Tools Providers" in the Oracle Application Server Portal Configuration Guide, available on the OracleAS Portal Documentation page on OTN (http://www.oracle.com/technology/products/ias/portal/documentation.html). After the driver is installed, you'll notice it listed in the Driver Name drop-down list on the Connection dialog box on the Source tab, as shown in Figure 3-6.

Figure 3-6 Connection Information on the SQL Source Tab

Description of Figure 3-6  follows
Description of "Figure 3-6 Connection Information on the SQL Source Tab"


Note:

For more information on using DataDirect drivers with OmniPortlet, refer to the "How to Use DataDirect JDBC Drivers with OmniPortlet" technote available on the Portlet Development page of Portal Center (http://portalcenter.oracle.com).

For more information about DataDirect drivers in general, refer to the Certification Matrix for Oracle Application Server and DataDirect JDBC (http://www.oracle.com/technology/tech/java/oc4j/htdocs/datadirect-jdbc-certification.html) and the OC4J page on OTN (http://www.oracle.com/technology/software/products/ias/htdocs/utilsoft.html).


When you want to use one of the DataDirect drivers, you must use a unique connection string format: hostname:port, where hostname is the name of the server where the database is running, and port is the listening port of the database. You can see an example in Figure 3-7.

Figure 3-7 Edit Connection Page with DataDirect Driver

Description of Figure 3-7  follows
Description of "Figure 3-7 Edit Connection Page with DataDirect Driver"

3.2.2.5 XML

Although still a relatively new method of storing data, XML is increasingly used to control access to data sets over the intranet, and even the Internet. On the Source tab, you can specify the URL of the XML file that contains your data.


Note:

For more information on using the XML data source, refer to Section 4.4, "Building an OmniPortlet Based on an XML Data Source".

Figure 3-8 Source Tab: XML

Shows XML Source tab.
Description of "Figure 3-8 Source Tab: XML"

Next to the XML URL and the XSL Filter URL fields are Test buttons which you can use to validate your XML data source and the XSL filter.

The specified XML file can either be in tabular (ROWSET/ROW) structure, or you can provide an XML Style Sheet (XSL) to transform the data into the ROWSET/ROW structure. The following image shows an example of the ROWSET/ROW structure of an XML data source.

Figure 3-9 ROWSET/ROW Structure of an XML Data Source

Shows ROWSET/ROW structure.
Description of "Figure 3-9 ROWSET/ROW Structure of an XML Data Source"

In the previous example, the <TEAM> tags delineate the rowset, and the <EMPLOYEE> tags delineate the rows.

Regardless of the format of the XML file, OmniPortlet automatically inspects the XML to determine the column names, which will then be used to define the layout. If you want to specify this information yourself, you can supply a URL to an XML schema that describes the data.

Similar to the other data sources, you can also specify the connection information for this data source, if the XML file is located on a secured server protected by HTTP Basic Authentication.


Note:

Since the OmniPortlet provider exists and executes in a different tier from OracleAS Portal and does not have access to the OracleAS Portal session information, you must expose XML files that are uploaded to OracleAS Portal as PUBLIC in order for OmniPortlet to access them.

3.2.2.6 Web Service

A Web Service is a discrete business service that can be programmatically accessed over the Internet using standard protocols, such as SOAP and HTTP. Web Services are non-platform and non-language specific, and are typically registered with a Web Service broker. When you find a Web Service you wish to use, you must obtain the URL to the WSDL (Web Service Description Language) file that describes the Web Service and specifies the methods that can be called, the expected parameters, and a description of the returned data.

OmniPortlet supports both types of Web Services: Document and RPC (Remote Procedure Calls). After a WSDL document/file is supplied, it is parsed, and the available methods that can be called display on the Source tab.

Similar to the XML data source, OmniPortlet expects the Web Service data in ROWSET/ROW format, though you can also use an XSL file to transform the data. OmniPortlet inspects the WSDL document/file to determine the column names, though you may also specify an XML schema to describe the returned data set.

If you are new to Web Services, you may want to first review the New to Web Services guide on the Web Services Technology Center page on OTN (http://otn.oracle.com/tech/webservices/learner.html).


Note:

For more information on using the Web Service data source, refer to Section 4.2, "Building an OmniPortlet Based on a Web Service".

Figure 3-10 Source Tab: Web Service

Shows Web Service Source tab.
Description of "Figure 3-10 Source Tab: Web Service"

3.2.2.7 Web Page

OmniPortlet enables you to use existing Web content as a source of data to publish information to your portal. It provides and renders clipped Web content as a data source.

The Web Page data source extends the scope offered by the Web Clipping Portlet to include scraping functionality. It also supports the following features:

  • Navigation through various login mechanisms, including form- and JavaScript-based submission, and HTTP Basic and Digest Authentication with cookie-based session management.

  • Fuzzy matching of clippings. If a Web clipping gets reordered within the source page or if its character font, size, or style changes, it will still be identified correctly by the Web page data source and delivered as the portlet content.

  • Reuse of a wide range of Web content, including basic support of pages written with HTML 4.0.1 and JavaScript, retrieved through HTTP GET and POST (form submission).

All Web clipping definitions are stored persistently in the Oracle Application Server infrastructure database or on another Oracle database. Any secure information, such as passwords, is stored in encrypted form, according to the DES (Data Encryption Standard), using Oracle Database encryption technology.

The Source tab of the OmniPortlet Wizard enables you to launch the Web Clipping Studio by clicking the Select Web Page button. Once you launch the Web Clipping Studio, you can refer to the Oracle Application Server Web Clipping online Help.


Note:

For more information on using the Web Page data source, refer to Section 4.5, "Building an OmniPortlet Based on a Web Page Data Source".

Figure 3-11 Source Tab: Web Page

Shows Web Page Source tab.
Description of "Figure 3-11 Source Tab: Web Page"

3.2.3 Filter

After you've selected the data source and specified the data source options, you can further refine your data by using OmniPortlet's filtering options. To use filtering efficiently, it is better to refine the data as much as possible at the data source level on the Source tab, then use the options on the Filter tab to streamline the data. For example, if you are using a SQL data source, you could use a WHERE clause to return only specific data from the specified columns. In this case, you could skip the Filter tab and continue to the View page of the wizard. However, if there are no filtering options at the data source level, you can use the options on the Filter tab to sort your data.

3.2.4 View

Once you've specified the data and sorted it, you can choose the view options and layout for your OmniPortlet. The View tab enables you to add Header and Footer text, choose a Layout style that you can later refine on the Layout tab, and enable caching. You can choose from the following layouts:

  • tabular

  • chart

  • news

  • bullet

  • form


Note:

For more information on the different layout styles you can use with OmniPortlet, see the next section or click Help in the upper right corner of the page in the OmniPortlet Wizard.

3.2.5 Layout

The Layout tab changes depending on the Layout Style you chose on the View tab, and enables you to further personalize the appearance of your portlet. For example, OmniPortlet supports drill-down hyperlinks in the chart layout. That is, you can set up the chart so that when a user clicks on a specific part of the chart, an action occurs (for example, jump to another URL).

For the other layout styles, you can define each column to display in a specific format, such as plain text, HTML, an image, button, or field. For example, suppose you selected a data source that includes a URL to an image. To see this image, you can select Image for the display of this column. Each column can also be mapped to an action, similar to the behavior of chart hyperlinks.

The following layout styles are available with OmniPortlet:

3.2.5.1 Tabular Layout

Figure 3-14 Layout Tab: Tabular Style

Shows Layout tab for Tabular style.
Description of "Figure 3-14 Layout Tab: Tabular Style"

Once you've chosen the tabular style on the View tab, you can refine the layout on the Layout tab. Typically, you use the tabular layout if you have one or more columns of data that you want to display in a table. You can choose Plain to display all rows in the table without any background color, or Alternating to display a background color for every other row in the table.


Note:

You can control the background color of a portlet through the portal page style. For more information on using portal page styles, refer to the Oracle Application Server Portal User's Guide.

In the Column Layout section, you can choose which data columns to display in the portlet, then select a display format for the data. Here, you can set a column to display a hyperlink, so that a secondary Web page displays when the user clicks that column in the table. You can also specify whether the secondary Web page displays in a new window.

Figure 3-15 Example of an OmniPortlet Using a Tabular Layout

Shows example of portlet using tabular layout.
Description of "Figure 3-15 Example of an OmniPortlet Using a Tabular Layout"


Note:

For more information on using the OmniPortlet Wizard, click the Help link in the upper right corner of the Layout tab.

3.2.5.2 Chart Layout

Figure 3-16 Layout Tab: Chart

Shows Layout tab for Chart style.
Description of "Figure 3-16 Layout Tab: Chart"

You can use the chart layout to display your data graphically, as a bar, pie, or line chart. On the Layout tab, you select the chart style and the column layout. When you choose the column layout, you can choose the groups, or columns on which the labels will be based. The category defines the values that will be used to create the chart legend, and the value determines the relative size of the bars, lines, or slices in the chart. You can also select whether the sections of the chart should point to a hyperlink, and whether the targeted information should display in a new window.


Note:

To group the information in the chart, you must group the information at the data level (for example, in your SQL query statement). Also, if numeric values in a data source contain formatted strings, commas, or currency (for example, $32,789.00), they are considered to be text and ignored when the chart is generated. You should remove these formatting characters if you want them to be correctly read as numerical values.

Figure 3-17 Example of the Layout Tab for a Pie Chart Layout

Shows Layout tab for Pie Chart style.
Description of "Figure 3-17 Example of the Layout Tab for a Pie Chart Layout"

You can also define chart hyperlinks so that each bar, pie section, or line links to another Web page. For example, you can display a chart portlet and a report portlet on your portal page, then set up the chart hyperlink to display a row in the report that displays more detailed information about the selected data.

In the image that follows, you can see the results of the options selected on the Layout tab in the previous image. Following the chart, you can see that the category, which was Department on the Layout tab, is used for the legend.

Figure 3-18 Example of an OmniPortlet Using a Pie Chart Layout

Shows example of pie chart layout.
Description of "Figure 3-18 Example of an OmniPortlet Using a Pie Chart Layout"

3.2.5.3 News Layout

Figure 3-19 Layout Tab: News

Shows Layout tab for News style.
Description of "Figure 3-19 Layout Tab: News"

You can use the news layout to display links to articles with brief descriptions for each. You can use this layout to publish information in standard XML formats, such as RDF (Resource Description Framework) or RSS (RDF Site Summary) to your portal page. In the Column Layout section, you can add a heading that displays at the top of the portlet. You can also add a logo, or use the scrolling layout so that the user can view all the information in the portlet as it moves vertically. Here, also, you can enter a URL so that another Web page displays when the user clicks on specific data in the portlet. You can also specify whether the secondary Web page displays in a new window.


Note:

The News Layout Scroll type in OmniPortlet is supported on Microsoft Internet Explorer and Netscape 7.0.

Figure 3-20 Example of an OmniPortlet Using a News Layout

Shows example of portlet in a news layout.
Description of "Figure 3-20 Example of an OmniPortlet Using a News Layout"


Note:

For more information on using the OmniPortlet Wizard, click the Help link in the upper right corner of the Layout tab.

3.2.5.4 Bullet Layout

Figure 3-21 Layout Tab: Bullet

Shows Layout tab for Bullet style.
Description of "Figure 3-21 Layout Tab: Bullet"

You can use the bullet layout to display your data in a bulleted list. The Layout tab provides a variety of different bullet and numbered bullet styles. In the Column Layout section, you can choose how the columns will display in the portlet, as well as whether a second Web page will display when the user clicks that column. You can also specify whether the second Web page displays in a new window.

Figure 3-22 Example of an OmniPortlet Using a Bullet Layout

Shows example of portlet with bullet style.
Description of "Figure 3-22 Example of an OmniPortlet Using a Bullet Layout"


Note:

For more information on using the OmniPortlet Wizard, click the Help link in the upper right corner of the Layout tab.

3.2.5.5 Form Layout

Figure 3-23 Layout Tab: Form

Shows Layout tab for Form style.
Description of "Figure 3-23 Layout Tab: Form"

You can use the form layout if you have data you want to display as labels or default values in a form, such as Name: <name>. You can then use portlet parameters and events to pass data to the selected row.

You can also specify whether to display the target of a URL in a new window:

Figure 3-24 Open In New Window Check Box

Shows the Open In New Window checkbox.
Description of "Figure 3-24 Open In New Window Check Box"

Figure 3-25 Example of an OmniPortlet Using a Form Layout

Shows example of portlet using form style.
Description of "Figure 3-25 Example of an OmniPortlet Using a Form Layout"


Note:

For more information on using the OmniPortlet Wizard, click the Help link in the upper right corner of the Layout tab.

3.2.6 Edit Defaults mode

After you have created your OmniPortlet and returned to your portal page, you can click the Edit Defaults icon to change the portlet options if required. You will notice that, in the Edit Defaults mode, there are tabs that correspond to the different steps in the OmniPortlet Wizard (except for the Type step) to directly access the different options. There is also one extra tab, the Events tab, which is explained in the next section.

When you edit an OmniPortlet using the Edit Defaults mode, keep in mind the following notes:

  • A new mode, "none," is the default setting for the Locale Personalization Level of OmniPortlet and the Simple Parameter form. This mode indicates that, when you edit the portlet defaults using the Edit Defaults mode, the changes apply to all users, regardless of the current OracleAS Portal session language and the locale of your browser. For more information about these settings, refer to Appendix I "Setting the LocalePersonalizationLevel" in the Oracle Application Server Portal Configuration Guide on the OracleAS Portal Documentation page on OTN.

  • You can personalize the portlet at runtime by clicking the Personalize link on the portlet. When you personalize the portlet, a complete copy of the personalization object is created. Since all properties are duplicated, subsequently modifying the portlet through Edit Defaults will not be reflected in the personalized version of the portlet. To ensure the latest changes are made to the portlet, you must click Personalize again (after the modifications from the Edit Defaults wizard are made), then select the Reset to Defaults option.

  • By default, the OmniPortlet provider uses the file-based Preference Store to store the personalization object, which stores the object in a file system in the middle-tier. If you decide to deploy OmniPortlet in a multiple middle-tier environment, you must use a shared Preference Store, such as the database Preference Store (DBPreferenceStore). To do so, you can choose to do one of the following:

    • Use a file-based Preference Store now, then migrate to the database Preference Store later using the PDK Preference Store Migration Utility.

    • Configure OmniPortlet to use the DBPreferenceStore, and follow the steps in Section "5.3.6 Step 6: Configure Portal Tools and Web Providers (Optional)" of the Oracle Application Server Portal Configuration Guide.

3.2.7 Events

On the Events tab in the Edit Defaults mode of the OmniPortlet Wizard, you can identify event parameters based on the portlet parameters you selected on the Source tab.

Figure 3-26 Events Tab of the OmniPortlet Wizard

Shows Events tab of OmniPortlet wizard.
Description of "Figure 3-26 Events Tab of the OmniPortlet Wizard"

3.3 Parameters and Events

Out of the box, OmniPortlet can receive up to five parameters and raise up to three events. Each of the events can send one or more parameters. For example, you can set up a chart that displays the employees in a department. When the user clicks one piece of the chart (for example, a department name), an event is raised that sends a parameter to the page. The page may then pass a parameter to all the portlets on that page that display information about the employees. Then, all the portlets on the page display information about the employees in the selected department.


Note:

To learn how to use parameters and events with OmniPortlet, follow the steps in Chapter 4, "Building Example Portlets with OmniPortlet". If you are comfortable with the provider.xml file, you can add more parameters and events by editing the file.

To set up parameters and events, you must first enable the page group to accept parameters and events. In Oracle Application Server 10g, parameters and events are enabled by default. Then, you set up each portlet to accept the necessary parameters, and raise the required events. After you've set up the portlet parameters, you can link the portlets together by setting up the page-level parameters and events.

3.3.1 Portlet Parameters and Events

Out of the box, you can define up to five portlet parameters for an OmniPortlet. You can do this:

  • On the Source tab of the wizard when you define the OmniPortlet

  • On the Source tab when you select Edit Defaults for the OmniPortlet

Figure 3-27 Source Tab: Portlet Parameters Section

Shows Portlet Parameters section of Source tab.
Description of "Figure 3-27 Source Tab: Portlet Parameters Section"

Parameter values determine what data is displayed in the portlet. You can also use a parameter to pass a value in a URL or to embed a value in the portlet text.


Note:

You can learn more about portlet parameters in the online Help, which you can access by clicking the Help link on the Source tab in the OmniPortlet Wizard. The online Help describes portlet parameters in detail, and how to set them up for your OmniPortlet. You can also refer to the Oracle Application Server Portal User's Guide.

You can set up each OmniPortlet to raise up to three events. Each event can pass up to three parameters. Each parameter can be a portlet parameter, such as Param1, or a data source column, such as Department_No. You set up events on the Events tab in the Edit Defaults mode of OmniPortlet.

3.3.2 Page Parameters and Events

After you've set up the parameters and events for each OmniPortlet on a portal page, you can map the portlet parameters and events to other portlets on the same page. For more information on using page parameters and events, refer to the OracleAS Portal online Help and the Oracle Application Server Portal User's Guide.

3.4 Summary

In this chapter, you learned about OmniPortlet and its capabilities. You also learned about using parameters and events to integrate portlets on a page and create a portal application.

You can find more information about using the various tools in OmniPortlet by clicking the Help link on each of the pages in the wizard. For information on using OmniPortlet, refer to Chapter 4, "Building Example Portlets with OmniPortlet". For more information on using Web Clipping, refer to Chapter 5, "Creating Content-Based Portlets with Web Clipping".