Building an OmniPortlet Based on a Web Page Data Source
10. In the top right corner of the Web Clipping Studio, click the Section button, as
shown in Figure 4–17 . Figure 4–17 The Section Button 11. After you click the Section button, youll notice that the elements of the Web page are broken down, and that a new icon displays called Choose at the top of each section. Figure 4–18 shows a snapshot of the Web Clipping Studio. 4-12 Oracle Fusion Middleware Developers Guide for Oracle Portal Figure 4–18 Web Clipping Studio Displaying the Web Page Sections12. Find the section shown in
Figure 4–19 , which shows the weather information for the city you chose in this example, San Francisco Bay Shoreline. Figure 4–19 Weather Information for San Francisco Bay Shoreline with the Choose Icon13. Click the Choose icon for this section, located directly above the Forecast for San
Francisco Bay Shoreline title bar, as shown in Figure 4–19 . The section displays in the Web Clipping Studio, as shown in Figure 4–20 . Building Example Portlets with OmniPortlet 4-13 Figure 4–20 Weather Information Section for San Mateo County in the Web Clipping Studio 14. After you have chosen the clipping, you can refine your data further by scraping the data, that is, selecting specific cells you wish to display in your portlet. Click the Scrape button Figure 4–21 . Figure 4–21 The Scrape Button 15. While in Scraping mode, you can identify the text pieces in the Web clipping by selecting the check boxes next to each item. You can repeat these items at the column level, row level, or table level. In this example, we want to show the title and the description of each resulting article from our search. We can repeat the title and description at the row level, so that each result returned by the search displays only the title and the description of every result. In general, you choose the text items in the first row that contains all the pieces you wish to repeat for each row. After you click the Scrape button, youll notice that check boxes display next to each item on the Web page, as shown in Figure 4–22 . Figure 4–22 Scraping Check Boxes16. Select the output you want by selecting the check boxes next to the
items. Figure 4–23 shows an example of a check box. 4-14 Oracle Fusion Middleware Developers Guide for Oracle Portal Figure 4–23 Check Box for San Mateo County Title 17. After you select the check box for Forecast for San Mateo County, notice that a corresponding label displays in the Data section of the Web Clipping Studio at the bottom of the screen, as shown in Figure 4–24 . Figure 4–24 San Mateo County Label in Data Section18. In the Name field, enter a more meaningful name, such as
SanMateoCountyForecast. Do not include spaces in the name.19. Select the fields you wish to display and add the corresponding labels as you
select them. The following is a list of sample information we chose for this example, but you can choose your own examples depending on the current weather. You can see the following selected weather information in Figure 4–25 : ■ Forecast for San Mateo County title ■ Today ■ Todays Weather ■ Thursday ■ Thursdays Weather Note: Depending on the color of the section you want to select, the check boxes may not be prominently displayed. Building Example Portlets with OmniPortlet 4-15 Figure 4–25 Selected Weather Information20. Now that youve selected the data you want to display, click the Continue button,
as shown in Figure 4–26 . Figure 4–26 The Continue Button 21. On the page that displays, verify that the information in the Clipping Attributes section includes the title: Weather Underground: Redwood City, California Forecast, as shown in Figure 4–27 . Figure 4–27 Clipping Attributes Section of the Web Clipping Studio 22. Verify that the information in the Clipping Parameters section includes the parameters as shown in Figure 4–28 . Note: With the Web page data source, you can select URLs as part of your Web clipping. In Oracle Portal 10.1.2 and later, the context of the application is maintained. So, for example, any images that display on the hyperlinked page will be maintained. 4-16 Oracle Fusion Middleware Developers Guide for Oracle Portal Figure 4–28 Clipping Parameters Section of the Web Clipping Studio 23. Select the Clipping Parameter? check box for the second parameter with the name query.24. Click OK.
25. On the Source tab of the OmniPortlet Wizard, the new title and description now display. To edit the Web clipping in the Web Clipping Studio, you can click the Select Web Page button again, as shown in Figure 4–29 . Figure 4–29 Web Page Source Tab26. Under the Clipping Parameters heading, you should see the clipping parameter
you set on the previous page, as shown in Figure 4–30 : Figure 4–30 Clipping Parameter to Portlet Parameter Mapping27. Under the Portlet Parameters heading, next to Param1, set the Default Value to
the zip code, 94065, as shown in Figure 4–31 . Figure 4–31 Portlet Parameters Section28. Click Next.
29. On the Filter tab, click Next.
30. On the View tab, in the Title field, enter Weather Information. 31. In the Footer Text field, enter Source: Weather Underground and make sure the Show Footer Text check box is selected.32. Under Layout Style, select the News radio button. The View tab should look like
Figure 4–32 . Building Example Portlets with OmniPortlet 4-17 Figure 4–32 View Tab with the Options Selected33. Click Next.
34. Verify that the Layout tab looks like Figure 4–33 . Figure 4–33 Layout Tab35. Click Finish.
36. Your new Web Page portlet displays on the portal page, and should look like
Figure 4–34 . Figure 4–34 Weather Information Portlet on the Portal Page Now that you have completed building all four example OmniPortlets, your page should look like Figure 4–35 . 4-18 Oracle Fusion Middleware Developers Guide for Oracle Portal Figure 4–35 Portal Page Displaying the Four Example OmniPortlets4.6 Setting Up Portlet Parameters and Events
The steps in this section show you how to set up the portlets and page you created to use parameters. Then, when a user clicks a slice of the pie chart generating a portlet event that corresponds to a region for example, New York, the Weather Forecast per Zip Code portlet based on a Web Service and the Weather Information portlet based on a Web page will display the corresponding weather information for that region New York. To set up portlet parameters and events, you will need to do the following: ■ Section 4.6.1, Configure Portlets to Accept Parameters ■ Section 4.6.2, Map the Page Parameter to the Portlet Parameters ■ Section 4.6.3, Configure the Chart Portlet to Use Events ■ Section 4.6.4, Map the Chart Event to the Page4.6.1 Configure Portlets to Accept Parameters
The steps in this section will show you how to configure the two portlets on your page that accept parameters the Web Service portlet that displays Weather Forecast per Zip Code information and the Web page portlet that displays Weather Information. To configure the two portlets to accept parameters, perform the following steps:1. In Edit mode of the page, click the Edit Defaults icon in the top left corner of the
Web Services portlet, as shown in Figure 4–36 . Building Example Portlets with OmniPortlet 4-19 Figure 4–36 Edit Defaults Icon in the Web Services Portlet2. On the Source tab, replace the value of param0 94065 with Param1, as
shown in Figure 4–37 . Figure 4–37 param0 Set to Param13. Under Portlet Parameters, set the default value of Param1 to 94065.
4. In the Personalize Page Label field, enter Zip.
5. In the Personalize Page Description field, enter Enter zip code, as shown in
Figure 4–38 . Figure 4–38 Portlet Parameters Section of the Web Services Source Tab6. Click OK.
7. On the portal page, in Edit mode, click the Edit Defaults icon for the Web page
portlet, as shown in Figure 4–39 . Figure 4–39 Edit Defaults Icon for the Web Page Portlet 8. On the Source tab, since you have already mapped a portlet parameter to the clipping parameter, you can simply add a label and description to the portlet parameter Param1, as shown in Figure 4–40 . 4-20 Oracle Fusion Middleware Developers Guide for Oracle Portal Figure 4–40 Portlet Parameters Section of the Web Page Source Tab9. Click OK.
You have created two portlet parameters in the Web Services and Web page portlets to accept page parameters. Next, you will map a page parameter to these two portlet parameters.4.6.2 Map the Page Parameter to the Portlet Parameters
The steps in this section will show you how to map the page parameters to the two portlets you configured in the previous section. To map the page parameter to the portlet parameters, perform the following steps:1. On the page, in Edit mode, click the Page: Properties link at the top of the screen,
as shown in Figure 4–41 . Figure 4–41 Page: Properties Link2. Click the Parameters tab.
3. Under New Page Parameter, in the Parameter Name field, enter zip, then click
Add , as shown in Figure 4–42 . Figure 4–42 New Page Parameter 4. Under Page Parameter Properties, the new page parameter displays. In the Default Value field, enter 94065, as shown in Figure 4–43 . Figure 4–43 Default Value for the zip Page Parameter 5. Under Portlet Parameter Values, you will see a list of portlets listed. If you have followed all the steps in this chapter, you will see four instances of OmniPortletParts
» Oracle Fusion Middleware Online Documentation Library
» Introduction to Portal Development Understanding Portlets
» Portlet Anatomy Oracle Fusion Middleware Online Documentation Library
» Out-of-the-Box Portlets Portlet Resources
» Other Sources of Prebuilt Portlets Web Clipping
» Portlet Builder Portlet Resources
» JSF Portlets Portlet Resources
» Programmatic Portlets Portlet Resources
» The Portlet Technologies Matrix
» Web Clipping OmniPortlet General Suitability
» Java Portlets Portlet Builder
» PLSQL Portlets General Suitability
» Java Portlets Expertise Required
» Web Providers Deployment Type
» WSRP Producers Deployment Type
» The user requests a portal page from the Web browser by entering a URL in the
» The Parallel Page Engine PPE, which resides in the Oracle Application Servers
» Database Providers Provider Registration
» PLSQL Portlets Development Tool
» OmniPortlet and Web Clipping Java Portlets Portlet Builder PLSQL Portlets
» Web Clipping OmniPortlet User Interface Flexibility
» Java Portlets and PLSQL Portlets
» Web Clipping OmniPortlet Java Portlets
» PLSQL Portlets Ability to Capture Content from Web Sites
» Web Clipping OmniPortlet Java Portlets Portlet Builder
» Public Portlet Parameters Support
» OmniPortlet, Web Clipping, and Portlet Builder
» Web Clipping and OmniPortlet Java Portlets Portlet Builder PLSQL Portlets
» Web Clipping OmniPortlet Java Portlets PLSQL Portlets
» Introduction to OmniPortlet Oracle Fusion Middleware Online Documentation Library
» Source The OmniPortlet Wizard
» Filter The OmniPortlet Wizard
» View Layout The OmniPortlet Wizard
» Edit Defaults mode The OmniPortlet Wizard
» Portlet Parameters and Events
» Adding an OmniPortlet Instance to a Portal Page Building an OmniPortlet Based on a Web Service
» Building an OmniPortlet Based on a Spreadsheet CSV
» Building an OmniPortlet Based on an XML Data Source
» Building an OmniPortlet Based on a Web Page Data Source
» Under New Page Parameter, in the Parameter Name field, enter zip, then click
» For the fourth OmniPortlet in the list, follow the same steps to set Param1 to the
» Set the Page Input as shown in Click OK.
» Building an OmniPortlet Using the HTML Layout
» Above the Web Clipping portlet, click the Edit Defaults icon, as shown in
» In the URL Location field, enter the location of the starting Web page that links to Click Start.
» At the top left of the section of the Web content you want to clip, click Choose.
» In the Find a Web Clipping page, click OK to display the selected Web clipping in
» In the Default Value field, enter a value to use by default for the parameter.
» Select Basic Authentication as the authentication method.
» In the Additional Fields section, you can enter names and values of any Click OK.
» At the top left of the section of the Web content you want to clip, click Choos
» Click Select to confirm that the search result section is the one you want to clip.
» Because the content displayed in the portlet was reached by entering information
» In the parameters table, make the following changes:
» Click OK to display the default search results in the Web Clipping portlet on your
» In the Editing Views section, click View Page.
» In the Web Clipping portlet header, click Personalize, as shown in
» In the page that displays, scroll down to the Inputs section. Notice that the
» Click OK. Personalizing a Web Clipping Portlet
» Verify that the Web provider that contains the URL-based portlets you want to
» Find existing URL-based portlets.
» Performing the Migration Migrating from URL-Based Portlets
» Post-Migration Configuration Migrating from URL-Based Portlets
» Maintaining Migrated Portlets Migrating from URL-Based Portlets
» Current Limitations for Web Clipping
» User preference: Guidelines for Show Modes
» Instance defaults: Guidelines for Show Modes
» Guidelines for Edit Defaults Mode Options The following guidelines should
» Guidelines for Buttons in Edit Defaults Mode For consistency and user
» Preview Mode JPS and PDK-Java Full Screen Mode PDK-Java
» Help Mode JPS and Oracle Portal
» Link Mode PDK-Java Portlet defaults
» Guidelines for Navigation within a Portlet
» Guidelines for JavaScript Guidelines for Writing Java Portlets
» Guidelines for Mobile Portlets
» Introduction to Java Portlet Specification JPS and WSRP
» Click Next. Creating a JSR 168 Portlet
» Click OK. Repeat the preceding steps if you want to add more customization
» In the Description field, enter a description for the security role, explaining the Click OK.
» Initialization parameters provide the Web application developer, who decides
» In the Name field, enter a unique name for the initialization parameter. Use only
» In the Value field, enter a default value for the parameter.
» In the Description field, enter a description for the parameter.
» To delete an initialization parameter, select it in the table and click Remove.
» Click Next to display the Finish page.
» Click Finish to generate the files for your portlet. The following files should be
» Adding Portlet Logic to Your JSR 168 Portlet
» In the Application Navigator, right-click the project that contains your portlet and
» In the Deployment Profile Name field, enter a meaningful name for the
» Click OK. Deploying Your JSR 168 Portlet to the Oracle WebLogic Server
» When the Deployment Finished message displays in the Deployment Log at the
» Click Next to display the Portal Registration Property Values page
» Click Finish. You should see a Registration Confirmation page similar to the one
» Registering WSRP Producers in Enterprise Configurations
» Introduction to Oracle PDK-Java
» Click Next to display the General Portlet Information Page.
» Click Next to display the Public Portlet Events page
» Click the link underneath Service Name.
» In the New Gallery, expand the General category and select Deployment Profiles.
» In the Items list, select WAR File and click OK. The Create Deployment Profile --
» Click OK. The WAR Deployment Profile Properties dialog box opens.
» Under Web Application’s Context Root, select Specify Java EE Web Context Root
» Select the Contributors node under WEB-INFlib.
» Select Portlet Development. Deploying Your Oracle PDK-Java Portlet to an Application Server
» Click OK. The Project Properties dialog opens.
» Click OK. Deploying Your Oracle PDK-Java Portlet to an Application Server
» In the Application Navigator, right-click your project and select Deploy, then
» If you are not already on the Portal Builder page, click the Builder link in the
» In the Remote Providers portlet, click Register a Provider to display the Register
» In the Name field, enter the name of the provider. The name must not be more
» In the Display Name field, enter a name to display for the provider when it is
» In the Timeout field, enter the number of seconds Oracle Portal should try to
» In the Timeout Message field, enter the message to display when Oracle Portal
» From the Implementation Style list, select Web.
» Click Next to display the Define Connection page
» In the Domain Structure tree, select Deployments.
» Click the Targets tab, and select AdminServer and WLS_WSRP from the Servers Click Save.
» In Oracle JDeveloper, double-click the view.jsp file for your JPS-Standard
» Add the code that is indicated in bold in the following snippet:
» Open edit.jsp in the visual designer and click the Design tab. Notice that the
» Click the Design tab to see the new form field that you just added
» Updating the XML Provider Definition
» Viewing the Portlet Under Web Content, htdocs\myportlet, create an HTML page called
» Click the magnifying glass icon next to the portlet and a preview window similar
» Reviewing the Generated Code The wizard creates the following code for you by
» Modifying the Generated Code The JSP contains an input field for the portlet
» Implementing Personalization for Show Pages
» Edit your Show page and import NameValuePersonalizationObject and
» Preference Information Within the XML Provider Definition
» Portlet URL Types Intraportlet links refer to the Oracle Portal page on which
» Building Links with the Portlet URL Types To build links with the URL
» Building Forms with the Portlet URL Types Use of portlet parameters in forms is
» Implementing Navigation within a Portlet You can implement navigation within a
» Submitting Events Go to the Parameter tab of the page properties. Note that parameters should be
» You can append a parameter value to the URL and the portlet displays the value
» When you click the link, that value is passed to the Parameter portlet on its page
» Go to the provider deployment in the Oracle WebLogic Administration Console,
» Creating Private Events Enhancing PDK-Java Portlets
» Ensure you are logged in to an Oracle Portal instance with privileges to create
» Create a new portal page, ensuring it is visible to PUBLIC.
» Add your Java portlet to the page.
» Make a note of the direct URL to your new Portal page.
» Now log out of the Portal instance by clicking the Logout link.
» Oracle Portal Server Security
» HTTPS Communication Directly access the Portal page by entering the URL noted in Step 4 into your
» Implementing Oracle Internet Directory Security PDK-Java provides a set of
» Viewing Your Portlets After you secure your provider with Oracle Internet
» Ensure you are logged in to an Oracle Portal instance as a user who is a member of
» Use an existing page or create a new one, ensuring it is visible to PUBLIC.
» Make a note of the direct URL to your new page.
» Click Logout. Implementing Portlet Security
» The portlet instance is the portlet on a page with the default personalizations made
» Create a stock portlet and implement the Show mode with the following
» Create two regions on a sample page and add My Stock Portlet to the first region.
» Securing Provider Communications If the security of exportingimporting
» Disabling ExportImport of Personalizations The JNDI variable,
» Obfuscating Data for Transport Automatic By default, personalization data is
» Exporting by Reference Example To export by reference rather than exporting
» Expiry-based Caching Enhancing Portlet Performance with Caching
» Invalidation-based Caching: Enhancing Portlet Performance with Caching
» You have followed through and understood
» Activating Caching You built a portlet using the wizard and successfully added it to a page.
» Configuring the Provider Servlet To enable invalidation-based caching, you must
» Defining the Oracle Web Cache Invalidation Port If you are using an Oracle
» Configuring the XML Provider Definition Using a combination of tags in
» Manually Invalidating the Cache You may want the cached version of the portlet
» Enhancing Portlets for Mobile Devices
» Writing Multilingual Portlets Enhancing PDK-Java Portlets
» Oracle Portal and the Apache Struts Framework
» Creating an Oracle Application Development Framework ADF Portlet
» Portlet Show Modes Guidelines for Creating PLSQL Portlets
» Recommended Portlet Procedures and Functions
» Implementing the Portlet Package
» Open starter_provider2.pks in an editor.
» Save and close starter_provider2.pkb.
» Creating and Accessing a Preference Store
» Implementing a Session Store
» Passing Private Parameters Passing Page Parameters and Mapping Public Portlet Parameters
» Retrieving Parameter Values Using Parameters
» Identify the piece of information you require for your functionality.
» Use the appropriate method from wwctx_api to get and optionally set this value.
» Open the services_portlet.pkb file in an editor.
» Find the get_portlet_info function.
» Notice the usage of wwctx_api.get_user to derive the user information and set
» wwctx_api.get_user is used similarly in various places throughout
» Another example of getting context information occurs in the is_runnable
» Using Security Implementing Portlet Security
» Coding Security Implementing Portlet Security
» Indicate to Oracle Portal that it must generate specific headers for Oracle Web
» Determine whether you want to use system or user level caching. Set the
» Optionally, set up validation- or expiry-based caching as well.
» Add invalidation logic to your portlet where needed for example, when the
» Configuring and Monitoring the Cache
» Implementing Validation-Based Caching Improving Portlet Performance with Caching
» Implementing Expiry-Based Caching Improving Portlet Performance with Caching
» Implementing Invalidation-Based Caching Improving Portlet Performance with Caching
» Using Error Handling Implementing Error Handling
» Adding Error Handling Implementing Error Handling
» Add the event object, with an appropriate domain and subdomain combination,
» Register the log event record by using wwlog_api_admin.add_log_registry.
» Use start_log and stop_log to mark the events you want to log in your code.
» Adding Event Logging Implementing Event Logging
» Using Multilingual Support Writing Multilingual Portlets
» Adding Multilingual Support Writing Multilingual Portlets
» Registration Prerequisites Provider Record Input Registration Example
» Overview Oracle Fusion Middleware Online Documentation Library
» Secure Content Repository Views
» Terminology Content Management APIs
» Providing Access to the APIs and Secure Views
» Using Constants Guidelines for Using the APIs
» Resetting CMEF Global Variables
» Code Samples Oracle Fusion Middleware Online Documentation Library
» Setting the Session Context API Parameters
» Editing Page Properties Oracle Fusion Middleware Online Documentation Library
» Setting Item Attributes Editing Content
» Editing an Item Editing Content
» Moving an Item to a Different Page Moving Pages
» Moving Categories and Perspectives
» Deleting Items Deleting Content
» Deleting Pages Deleting Content
» Creating Pages Oracle Fusion Middleware Online Documentation Library
» Creating Categories and Perspectives
» Creating Items Oracle Fusion Middleware Online Documentation Library
» Setting Perspectives Attributes of Pages and Items
» Approving and Rejecting Items
» Searching For Items Across All Page Groups
» Searching For Pages in Specific Page Groups
» Searching For Items By Attribute
» Creating a Directory for the XML File
» Creating an XML File from a CLOB
» Generating Search Results in XML Workaround for get_item_xml
» Click Next. On the View page, select Tabular for the Layout Style, then click Next.
» Introduction to Multi-Lingual Support
» Querying the Default Language
» Setting the Session Language Modifying an Existing Translation Creating a Translation for an Item
» Translations and Item Versioning
» Retrieving Object Privileges Oracle Fusion Middleware Online Documentation Library
» Granting Page Level Privileges
» Removing Page Level Privileges
» Granting Item Level Privileges
» Removing Item Level Privileges
» Inheriting Item Level Privileges from the Page
» Enqueuing Messages How Does the Content Management Event Framework Work?
» Subscribers and Dequeuing Messages
» Exception Handling Listening for Messages
» Creating Subscriber Code Using the Content Management Event Framework
» In the toolbar at the top of the page, click the Properties link next to Page Group.
» Click the Configure tab to bring it forward.
» To enable CMEF, select the Enable Content Management Event Framework check
» Click OK to save your changes.
» Click Close to return to the page.
» Adding a Subscriber to WWSBR_EVENT_Q Running a CMEF Subscriber
» CMEF Message Payload Using the Content Management Event Framework
» Oracle Portal Actions and CMEF Events
» What Is the Content Management Event Framework? Installing the Examples
» Example: Portal Object Event Logging
» Example: Item Validation Oracle Fusion Middleware Online Documentation Library
» Integrating Workflow with Oracle Portal
» Example Overview Example: Integrating External Workflow
» Section 16.8.3.2, Grant Users the Manage Items With Approval Privileges
» Section 16.8.3, Run Scripts Required for the CMEF Workflow Integration
» Section 16.8.3.4, Create Subscriber and Check Procedures
» Section 16.8.3.5, Register the WF_CHECKURL Process with Oracle Workflow
» Enable Approvals and Notifications in Oracle Portal
» To enable approvals and notifications, select the Enable Approvals and
» Grant Users the Manage Items With Approval Privileges
» Go to any page in the page group and switch to Edit mode.
» Click the Approval tab to bring it forward.
» Select the Require Approval for All Users check box
» Create Subscriber and Check Procedures
» Log in to the CMEFSAMPLES schema and run the following: Start a new workflow project.
» Add the CMEF_WORKFLOW Subscriber to the WWSBR_EVENT_Q Queue
» Set the definition value in the provider_name.properties file that is
» From the WebLogic Server menu, choose Application Deployment, and then
» Click Continue. The URL mapping for Web Modules displays. The mappings will
» Click Next. Detailed Example Description
» In the Application Attributes section, for Application Name, enter the application
» Expand Deployment Plan. Detailed Example Description
» Click Deploy. Detailed Example Description
Show more