Showing posts with label Portlet. Show all posts
Showing posts with label Portlet. Show all posts

RichFaces + JSF RI + JBossPortletBridge + Liferay Portal on JBoss AS 4.2.x

The task to make few portlets for Liferay 5.1 Portal using RichFaces + JSF RI looks trivial. But it isn't.
There are few decisions:

  1. Use Liferay listener for Sun JSF with Sun's FacesPortlet.
  2. Use JBossPortletBridge, because it supports RichFaces and AJAX.

I choosed the second with understanding that JBossPortletBridge is in beta and everywhere says that it supports JBossPortal, but I did not find where says - "It supports Liferay too". It does not support Liferay Portal 5.0.
I found few interesting things, that anyone should know before starting write portlets with RichFaces for Liferay using JBossPortletBridge 1.0.x Beta:

  1. RichFaces should be at least 3.2.1.
  2. You should configure portlet as ajaxable with server side state saving policy
  3. Override the javax.portlet.faces.GenericFacesPortlet given with JBossPortletBridge. You'll need manually setup the request attribute javax.servlet.include.path_info with correct viewId you want to process and render. Or you can setup this request attribute at the PortletExternalContextImpl class in calculateServletPath() method (remember JBossPortletBridge 1.0.x Beta).
  4. Use <a4j:commandXXX/> components to process navigation. <h:commandXXX/> will not help ((.


Good luck!



Update:
My friend Andriy has described the solution with details and configuration samples, and you can find his post by the url http://www.liferay.com/web/guest/community/forums/-/message_boards/message/1712557. It really can be useful for you.



I've uploaded the portlet sample prototype, so it's ready and waits for you :)
http://www.esnips.com/doc/de8b5661-fb6d-4fc7-83a3-ed09aa72c695/PortletPrototype