Inter-portlet Communication with OmniPortlet

OmniPortlet was originally built for Oracle Portal, allowing page designers to visualize various types of data sources in a declarative manner in the browser, without using an IDE. The two simple steps of defining an OmniPortlet in-place are: selecting and specifying your data source (XML, SQL, CSV, Web service, etc.), and applying the visualization/view on top (table, bullet, scrolling news, or even custom HTML).

While OmniPortlet doesn’t support ADF eventing, if all you need is driving a detail OmniPortlet from a master one, here is how you can achieve it. In this example I’m using WebCenter Spaces, but the same applies to any custom WebCenter portal application that leverages Oracle Composer.

Edit your page, and drop two instances of OmniPortlet onto the page. At this point they will be undefined.

From the View Actions Menu of the first one, select the Customize menu.

For our simple demo, select CSV as the data source, and leave the default settings for the CSV URL. The only thing we’ll change in this portlet is the Layout Style: HTML.

For the non-repeating heading section, specify the hyperlink for your master portlet. What you need to know for this step, is the URL of your page, containing your portlet. If you’re using WebCenter Spaces, an easy way to find this out is through the About menu of your page. In my case, the page is called OmniPage, and it’s in the group space, called MyGroupSpace. Notice the URL parameter appended to the linked page, PageParam1 (you can choose your own name, of course), and the values assigned to it: Hello in the first line, and World in the second.

<a href="http://mywebcenter.com/webcenter/spaces/GS/page/OmniPage?PageParam1=Hello">Hello</a>
<br>
<a href="http://mywebcenter.com/webcenter/spaces/GS/page/OmniPage?PageParam1=World">World</a>

Note: The above code snippet appears to be incomplete, but if you select it and paste it into a text editor, you will have it all.

Customize the second OmniPortlet, choose HTML for the Layout Style. All you need to do, is reference the parameter passed to this OmniPortlet, by using the OmniPortlet syntax: ##Param1##.

The last step is specifying that the request parameter specified in the first OmniPortlet, PageParam1, should e passed to the first parameter of OmniPortlet, Param1. To do this, make sure the page is in edit mode. Click the Edit (pencil) link of the Detail (consumer) OmniPortlet, and specify the following value for Param1: #{param.PageParam1}. This is the EL syntax for “request parameter, called PageParam1″.

Save your changes, and close the edit mode of your page. What you should see is similar to this when clicking on Hello:

And here is what you get when clicking on World:

One important caveat: this is more of a trick or workaround for OmniPortlet’s (and PDK-Java as a portlet technology’s) shortcoming, the lack of support for ADF model events. This solution will perform a full page refresh, and it also resets/looses your JSF session. If you’re designing components/portlets that should support inter-component communication, your first choice should always be ADF task flows or WSRP 2.0 portlets.

Wiki, Blog, and Discussion Sample Portlets for Oracle Portal

We have new sample wiki, blog, and discussion portlets available for download. The samples use the wiki, blog, and discussion server APIs, giving you examples of the types of functionality you can integrate into your environment.

New White Paper: Exposing WebCenter Services Task Flows as WSRP Portlets and Ensemble Pagelets

We have a new technical white paper published on OTN, written by one of our senior developers, Ken Young, that covers what it takes to expose the WebCenter Social Computing Services (discussions, email documents, etc.) through WSRP 2.0 for consumption in third party portal products. The white paper, titled Exposing WebCenter Services Task Flows as WSRP Portlets and Ensemble Pagelets comes with a sample project that makes it easy for you to follow the steps.

The screenshot below shows consuming the mail and document library task flows in Oracle Portal.

Oracle Portal, WebLogic Portal, WebCenter Interaction (ALUI) customers – this white paper is for you all!

E20PortletsInOraclePortal

Oracle Portal Product Strategy & Roadmap Web Casts

We have a series of web casts in November discussing our overall portal strategy and roadmap going forward. The webcasts will address feature updates, integrations, and certifications – as well as other news relevant to WebLogic Portal, WebCenter Interaction, and Oracle Portal customers.

Oracle Portal Products Strategy & Roadmap Update: WebLogic Portal
November 13, 2008
10:00 a.m. PT/1:00 p.m. ET

Oracle Portal Products Strategy & Roadmap Update: WebCenter Interaction (formerly AquaLogic User Interaction)
November 19, 2008
10:00 a.m. PT/1:00 p.m. ET

Oracle Portal Products Strategy & Roadmap Update: Oracle Portal
November 20, 2008
10:00 a.m. PT/1:00 p.m. ET

Go to the announcement on oracle.com to register for these web casts.

Follow

Get every new post delivered to your Inbox.