This chapter provides an overview of OmniPortlet and explains the user interface elements associated with OmniPortlet. This chapter contains the following sections:
For information about using OmniPortlet to build example portlets, see Chapter 4, "Building Example Portlets with OmniPortlet." For troubleshooting information regarding OmniPortlet, see Section B.3, "Diagnosing OmniPortlet Problems." For information about registering and configuring OmniPortlet with Oracle Portal, see Oracle Fusion Middleware Administrator's Guide for Oracle Portal.
OmniPortlet is a subcomponent of Oracle Portal that enables page designers and developers to easily publish data from various data sources using a variety of layouts without writing any code. 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.
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 do the following:
Display data from multiple sources (CSV, XML, SQL, and so on)
Sort the data to display
Format data using a variety of layouts (bulleted list, chart, HTML, and so on)
Use portlet parameters
Raise portlet events
Expose personalizable settings to page viewers
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.
To use OmniPortlet, the Simple Parameter Form, or the Web Clipping portlet with Windows 2000, you must use Netscape 7.0 or later, or Microsoft Internet Explorer 5.5 or later.
You can add an OmniPortlet to a portal page just as you would add any other portlet. OmniPortlet can be found under Portlet Builders in the Portlet Repository. If you have downloaded OmniPortlet as part of the Oracle Portal Developer Kit, for example, to upgrade to a later release, you must register it before you can use it.
You can find more information about building portal pages and adding portlets in Oracle Fusion Middleware User's Guide for Oracle Portal.
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, see Oracle Fusion Middleware Administrator's Guide for Oracle Portal.
The OmniPortlet Wizard initially contains five 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.
On the IBM Linux on Power platform, if the action buttons (Next, Previous, Finish, and Cancel) are minimized to dots when defining the OmniPortlet, increase the stack size shell limit to unlimited and restart the WLS_PORTAL instance. Run the following command to set the stack size shell limit to unlimited:
prompt> ulimit -s unlimited
This section provides a high-level overview of the six tabs, which are described in Table 3-1. 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.
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.
Provides the options for the selected data source, such as the URL of the Web Service you want to use. You can change these options later when editing the defaults of the portlet.
Provides sorting options at the Oracle Portal level to enable you to refine your results. You can change these options later when editing the defaults of the portlet.
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.
Provides detailed options for customizing the layout. You can change these options later when editing the defaults of the portlet.
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.
If you've downloaded and installed an additional data source, the data source will display on the Type tab.
|Data Source Type||Description|
Displays data from a text file containing character-separated values (CSV).
Displays data from a database using SQL.
Displays data from an XML file.
Displays data from a discrete business service that can be accessed over the Internet using standard protocols.
Displays data based on existing Web content.
J2EE Connector Architecture*
(Displays only if the Sample Provider is registered with Oracle Portal). A J2EE 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.
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, enabling 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 following two common areas on the Source tab:
Later, this section also describes the portion of the Source tab specific to each data source. The data sources available are as follows:
For more information on the Source tab options, click Help in the upper right corner of the page.
OmniPortlet supports proxy authentication, including support for global proxy authentication and authentication for each user. 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 Oracle Fusion Middleware Administrator's Guide for Oracle Portal.
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.
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 includes a Portlet Parameters section, where you can define the parameters for the portlet (Figure 3-2). You can then map the portlet parameters to the page-level parameters.
If you use parameters in place of Username, Password, or Connection String, the Test button will return an error, however the connection information is correct when the parameter values are substituted.
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 user name 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, see Section 22.214.171.124, "SQL."
For more information about the Connection section and the Edit Connection button, click Help on the Source tab of the OmniPortlet wizard.
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 (Figure 3-4). 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 Oracle 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 Oracle Portal application and does not have access to the Oracle Portal session information, you must expose CSV files that are uploaded to Oracle Portal as PUBLIC in order for OmniPortlet to access them.
For more information on using the CSV data source, see Section 4.3, "Building an OmniPortlet Based on a Spreadsheet (CSV)."
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 shows the Source tab for a SQL data source.
You can use the DataDirect JDBC drivers to access other relational databases. To configure OmniPortlet to use these drivers, see Oracle Fusion Middleware Administrator's Guide for Oracle Portal.
After the driver is installed, you'll notice it listed in the Driver Name list on the Connection dialog box on the Source tab, as shown in Figure 3-6.
For more information on DataDirect drivers, see the Certification Matrix for Oracle Fusion Middleware and DataDirect JDBC (
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.
You can also make a call to Stored Procedures instead of SQL statements to add business logic to your data. You can create your package and stored procedure in your database and refer the stored procedure in OmniPortlet.
For example, you could do the following using the SCOTT sample schema:
Create a package and declare a ref cursor:
create or replace package emp_pack istype empcurr is ref cursor;end;
Define a stored procedure, for example the following procedure accepts
JOB as a parameter and returns a ref cursor, where JOB Column in the
scott.Emp table, its value can be
MANAGER, and so on.
create or replace procedure emp_proc(eset OUT emp_pack.empcurr, jname IN VARCHAR2) is sql_statement varchar2(200); begin sql_statement := 'select empno,ename,hiredate from emp where job = '''||jname||''' order by EMPNO,hiredate'; open eset for sql_statement; end;
Add the PL/SQL statements from steps 1 and 2 to a SQL file (for example,
proc.sql) and save it to a directory.
Connect to the database using the following command:
Connection_String with the connection information to your database. You can find the connection string in the
tnsnames.ora file within your
Run the procedure:
Finally, create an OmniPortlet based on the SQL data source, enter the appropriate database connection information. In the SQL Statement box, enter the following code:
You can access XML data sources across the intranet or Internet. On the Source tab, you can specify the URL of the XML file that contains your data as shown in Figure 3-8.
For more information on using the XML data source, see Section 4.4, "Building an OmniPortlet Based on an XML Data Source."
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 example shows the ROWSET/ROW structure of an XML data source.
<TEAM> <EMPLOYEE> <DEPTNO>10</DEPTNO> <ENAME>KING</ENAME> <JOB>PRESIDENT</JOB> <SAL>5000</SAL> </EMPLOYEE> <DEPTNO>20</DEPTNO> <ENAME>SCOTT</ENAME> <JOB>ANALYST</JOB> <SAL>3000</SAL> <EMPLOYEE> </TEAM>
In this 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.
Since the OmniPortlet provider exists and executes in a different tier from Oracle Portal and does not have access to the Oracle Portal session information, you must expose XML files that are uploaded to Oracle Portal as PUBLIC in order for OmniPortlet to access them.
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 not specific to a platform or language, and are typically registered with a Web Service broker. When you find a Web Service you want to use, you must obtain the URL to the Web Service Description Language (WSDL) 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.
Figure 3-9 shows the Source tab for a Web service.
For more information on using the Web Service data source, see Section 4.2, "Building an OmniPortlet Based on a Web Service."
The Web Page data source extends the scope offered by the Web Clipping Portlet to include scraping functionality. It also supports the following features:
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.
All Web clipping definitions are stored persistently in the Oracle Fusion Middleware 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 (Figure 3-10) enables you to start the Web Clipping Studio by clicking the Select Web Page button. Once you start the Web Clipping Studio, you can see the Oracle Fusion Middleware Web Clipping online Help.
For more information on using the Web Page data source, see Section 4.5, "Building an OmniPortlet Based on a Web Page Data Source."
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 (Figure 3-11).
Once you've specified the data and sorted it, you can choose the view options and layout for your OmniPortlet. The View tab (Figure 3-12) 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:
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.
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:
Once you've chosen the tabular style on the View tab, you can refine the layout on the Layout tab (Figure 3-13). 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.
You can control the background color of a portlet through the portal page style. For more information on using portal page styles, see Oracle Fusion Middleware User's Guide for Oracle Portal.
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-14 shows an example of an OmniPortlet using a tabular format.
For more information on using the OmniPortlet Wizard, click the Help link in the upper right corner of the Layout tab.
You can use the chart layout to display your data graphically, as a bar, pie, or line chart. On the Layout tab (Figure 3-15), 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. Figure 3-16 shows an example of the Layout tab for a pie chart layout.
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.
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 Figure 3-17, you can see an example of a pie chart. Below the chart, you can see that the category, Department, is used for the legend.
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 (Figure 3-18), 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.
Figure 3-19 shows an example OmniPortlet using a news layout.
The News Layout Scroll type in OmniPortlet is supported on Microsoft Internet Explorer and Netscape 7.0.
For more information on using the OmniPortlet Wizard, click the Help link in the upper right corner of the Layout tab.
You can use the bullet layout to display your data in a bulleted list. The Layout tab (Figure 3-20) 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-21 shows an example of an OmniPortlet using a bullet layout.
For more information on using the OmniPortlet Wizard, click the Help link in the upper right corner of the Layout tab.
You can use the form layout (Figure 3-22) 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.
Figure 3-26 shows an example of an OmniPortlet using the HTML layout.
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 Oracle Portal session language and the locale of your browser. For more information about these settings, see Oracle Fusion Middleware Administrator's Guide for Oracle Portal.
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 on configuring Portal Tools and Web providers in Oracle Fusion Middleware Administrator's Guide for Oracle Portal.
On the Events tab (Figure 3-27) 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.
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.
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 Portal, 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.
Out of the box, you can define up to five portlet parameters for an OmniPortlet. You can define parameters in the following places:
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-28 shows the Portlet Parameters section on the Source tab.
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.
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 Oracle Fusion Middleware User's Guide for Oracle Portal.
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 (Figure 3-29).
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, see the Oracle Portal online help and Oracle Fusion Middleware User's Guide for Oracle Portal.