You are here

JSR286 Support for WebCenter 11.1.1.4

In this release of Webcenter, we finaly have support for JSR 286 portlets. This means that we can make use of the extended portlet standard. This enable us to have portlets that can easily communicate with each other without needing to configure lots of parameters or setting partialTriggers.

JDeveloper also has a new interface to manage the portlet.xml. This contains all the features to configure JSR286 portlets.

When you create a portlet in a portlet producing application, the wizard has not changed much. We still have the 8 known steps:

  • General Portlet Information
  • Additional portlet information
  • Content types and portlet modes
  • Customization Preferences
  • Security roles
  • Caching options
  • Initialization parameters
  • Finish

You notice that the checkbox is gone for enable inter portlet communication.
When you finish the wizard, all the default files will be created like the portlet class, jsp or jspx pages and portlet.xml. The oracle-portlet.xml is no longer generated because everything is now configured in the portlet.xml

On the left you have different tabs:

Application
Here you can define some default preferences and attributes like the possible modes you will use in the portlets in the producer.
You can also define a resource bundle for the provider here.

Portlets
In the portlets tab, you configure the actual portlets. When you select a portlet from the list, you can edit the configuration.
You are able to change the portlet information, select the events, parameters.
You can also define security and in the advanced tab you can define the preferences for the portlet.

Events
In the events tab you can define events that you can use in your portlets. Events are a way to enable inter portlet communication. You can add a payload to events so you can add object that need to be passed by the object.

A portlet can register itself to listen for the events so when another portlet fires the event, the portlet will notice this and act accordingly.

Parameters
Public render parameters are another way to enable inter portlet communication. Instead of triggering an event, you can also set and get values for parameters of the provider. These parameters are shared among the portlets of the same provider so when one portlet sets the value of a parameter, the other portlet can read the new value.

Filter
In the filter tab you can define filters that need to be applied to your producer.

Filter Mappings
The filter mapping goes together with the filters. In this section you can define the filters that need to be applied to which portlets.

In the previous version, you had to do a lot to achieve inter-portlet-communication. First you had to define the events or parameters in the oracle-portlet.xml which was an extension on the portlet.xml. A next thing you need to do was to map the parameters from both portlets to the same page parameters. This needs to be done in the page bindings of the page or when you do it during runtime, using the properties of the portlet.
You also need to set a partialTrigger on the receiving portlet so you need to find out the ID of the sending portlet.

With this release of Webcenter, all this hasle is not needed anymore. When you add events to a producer and add this to the portlets, they will automaticly be notifed when a portlet fires that event. So no need to modify the page bindings or set partial triggers. Now it is realy easy to wire two portlets together.

In the future I will write some more detailed posts about how to create JSR 286 portlets and how to use the events and parameters to enable inter portlet communication.

Category: 

Comments

Hi,
Can you provide sample code on interportlet communcation in jsr 286 webcenter portlet.
i gone through the oracle documentaion on this,but it was not clear to me

I will write a blog post on how to work with IPC in WebCenter before the weekend.

How exactly event works in web center.
Here you have show with parameter i just want to know how to use Events instead of parameter.

I enjoy, result in I discovered just what I was taking a look for.
You have ended my four day lengthy hunt! God Bless you man.
Have a nice day. Bye

Well written post. Highly recommended.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer