Building an OmniPortlet Based on a Spreadsheet CSV

Building Example Portlets with OmniPortlet 4-7 Figure 4–7 OmniPortlet: Character-Separated Values CSV Layout Tab

22. Click Finish.

Your portlet now displays on your portal page below the Weather Forecast portlet, and should look like Figure 4–8 . Figure 4–8 OmniPortlet: CSV OmniPortlet on the Page

4.4 Building an OmniPortlet Based on an XML Data Source

The steps in this section will show you how to use OmniPortlet to define a portlet that displays news information in a scrolling layout, based on an XML data source. 4-8 Oracle Fusion Middleware Developers Guide for Oracle Portal To create an OmniPortlet based on an XML data source, perform the following steps: 1. Create a region next to the Web Services portlet Weather Forecast on your portal page. 2. Add an OmniPortlet to this new region.

3. Start the OmniPortlet Wizard by clicking the Edit Default link.

4. On the Type page, select the XML radio button, then click Next.

5. On the Source page, in the XML URL field, enter the following URL:

http:www.nytimes.comservicesxmlrssnytTravel.xml

6. In the XSL Filter URL field, enter the following URL for the XSL file:

http:www.oracle.comtechnologyproductsiasportalviewlets omniportletnews.xsl

7. Click Next.

8. On the Filter page, click Next.

9. On the View page, in the Title field, enter Travel News.

10. Clear the Show Header Text check box.

11. In the Footer Text field, enter Source: The New York Times.

12. Ensure that the Show Footer Text check box is selected.

13. Under Layout Style, select the News radio button, then click Next.

14. On the Layout page, under News Style, select the Scrolling radio button.

15. In the Width field, enter 475.

16. In the Height field, enter 50.

The News Style section of the Layout tab should now look like the image shown in Figure 4–9 . Figure 4–9 OmniPortlet: XML Layout Tab - News Style Note: If you do not have access to the Internet, you can use a different RSS feed, but keep in mind that your results will not match the images in this example. Note: This XSL filter transforms the RSS news feed into the ROWSETROW structure that OmniPortlet can consume. Building Example Portlets with OmniPortlet 4-9

17. Under Column Layout, next to Field 1 choose title from the Column list,

Hyperlink from the Action list, and enter link in the URL field, as shown in Figure 4–10 . Figure 4–10 OmniPortlet: News Style Column Layout

18. Next to Field2, choose description from the Column list and leave the default

values for the other settings. Ensure this section of the Layout tab looks like Figure 4–11 . Figure 4–11 Column Layout Section of the Layout Tab

19. Click Finish.

Your portlet now displays on your portal page, as shown in Figure 4–12 . Figure 4–12 OmniPortlet: XML Scrolling News OmniPortlet on the Page

4.5 Building an OmniPortlet Based on a Web Page Data Source

The steps in this section will show you how to use OmniPortlet to create a portlet that displays weather information in a text format based on an existing Web Page. In this section, you will use OmniPortlet to clip and scrape content from Web sites. To create an OmniPortlet based on a Web page data source, perform the following steps: 1. Create a region below the XML portlet Travel News on your portal page. 2. Add an OmniPortlet to this new region.

3. Start the OmniPortlet Wizard by clicking the Edit Default link.

4. On the Type tab of the OmniPortlet Wizard, select the Web Page radio button,

then click Next. 5. On the Source tab, click Select Web Page.