Adding an OmniPortlet Instance to a Portal Page Building an OmniPortlet Based on a Web Service

4-4 Oracle Fusion Middleware Developers Guide for Oracle Portal Figure 4–3 OmniPortlet: Web Service Test Results Page

6. Close the window.

The Source page should look like the image shown in Figure 4–4 . Figure 4–4 OmniPortlet: Web Service Source Tab

7. Click Next.

8. On the Filter page, click Next.

9. On the View page, in the Title field, enter Weather Forecast. 10. In the Header Text field, enter Forecast per Zip Code.

11. Make sure the Show Header Text check box is selected, and clear the Show Footer

Text check box, as shown in Figure 4–5 . Note: If you do not have access to the Internet, you can use a different Web Service, but keep in mind that your results will not match the example in this chapter. Building Example Portlets with OmniPortlet 4-5 Figure 4–5 OmniPortlet: Web Service View Tab

12. Make sure the Tabular radio button is selected, then click Next.

13. On the Layout page, select the Plain radio button.

14. Specify the Column Label, Column, and Display As properties for your data

according to Table 4–1 .

15. Now that youve completed defining the portlet, click Finish. Your portlet should

look like Figure 4–6 . Figure 4–6 OmniPortlet: Web Service Portlet

4.3 Building an OmniPortlet Based on a Spreadsheet CSV

The steps in this section show you how to use OmniPortlet to define a portlet that displays regional information based on a spreadsheet CSV data source. This portlet will display the population of major U.S. urban areas in a pie chart. Table 4–1 Column Properties for the Weather Forecast Portlet Column Label Column Display As Day dayOfWeek Text High hiTemp Text Low lowTemp Text Precipitation precip Text Blank img Image 4-6 Oracle Fusion Middleware Developers Guide for Oracle Portal To create an OmniPortlet based on a spreadsheet, perform the following steps: 1. Create a region below the existing region 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 Spreadsheet radio button, then click Next.

5. On the Source page, in the CSV URL field, replace the existing text with the

following CSV: http:webservices.oracle.comWeatherWScity_population.csv

6. Ensure that the Use first row of spreadsheet for column names check box is

selected

7. Click Next.

8. On the Filter page, click Next.

9. On the View page, in the Title field, enter Major U.S. Urban Areas -

Population.

10. Clear the Show Header Text check box.

11. In the Footer Text field, enter Click a pie section to view the population of the specified urban area.

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

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

14. On the Layout page, select the Pie radio button.

15. In the Width field, enter 300.

16. In the Height field, enter 300.

17. From the Legend list, choose Top.

18. Select the 3D Effect check box.

19. Under Column Layout, from the Group list, choose None.

20. From the Category list, choose City.

21. From the Value list, choose Population. The Layout tab should now look like the

image shown in Figure 4–7 . Note: If you do not have access to the Internet, you can use the default URL, but keep in mind that your results will not match the example in this chapter. Note: The text you just entered in the Footer Text field instructs your end users to click a pie section to view more details about the selected population. To enable this feature, you will need to complete the steps in Section 4.6, Setting Up Portlet Parameters and Events . 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.