Reputation: 21
I am working on a JSR 286 portlet using JSF 1.2 on WebSphere Portal 7. I have been trying to find a way to do navigation between two portlets on the same page. Essentially:
They are using the same source, so I thought I could accomplish this by using a PhaseListener and the portlet namespace ids -- I have somewhat got this to work, but I can't help but think there has to be a better way to do this.
Before I continue down this route, does anyone know of the proper way for me to do navigation between two portlets?
Upvotes: 2
Views: 720
Reputation: 3077
A common thing I've done to make portlets communicate is using events. In your case, you would setup Portlet A to publish your buttonClick event and setup Portlet B to process the buttonClick event. In Portlet B you would set some render parameter and then use that in the doView to update the UI as needed. You will also need to create a wire between the two portlets.
Here is a link IBM's documentation on portlet communication. There might be some more ideas in there that fit better or give you more to go on.
Upvotes: 2
Reputation: 12548
Have a look at the Liferay Faces Portlet Bridge Demos.
The "JSF2 IPC (Events) - Customers" demo is probably what you are looking for. Why are you still using JSF 1.2? You can use JSF 2.0 even when on WebSphere Portal 7 on WAS 7. Just use the Mojorra libs and PARENT_LAST classloading.
Upvotes: 0