Forums

Home » Liferay Portal » English » Liferay Legacy »

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Joel Kozikowski
"Official" Liferay JSF portlet framework
May 25, 2007 10:39 AM
Answer

Joel Kozikowski

Rank: Expert

Posts: 405

Join Date: June 27, 2006

Recent Posts

Ok - its been a while since I've posted (been busy writing portlets) emoticon!

I was wondering - is there any "official" work being done w/ JSF and portlets for Liferay? I've started developing a "Liferay portlet library" to support portlets developed for LR with the intention on contributing it to the LR project. Since its been a while since I checked stuff out from the SVN trunk (trying not to rock the boat too much on my end), I didn't know if anything "new" has shown up.

My "Liferay JSF Library" currently has the following features:

1. Based on myfaces + facelets

2. A set of LR specific components that adds all the necessary styles and/or Javascript to make the controls match the portlet theme, as well as ease of use of core features:


<lr:table />
<lr:column />
<lr:columnLink />
<lr:scroller />
<lr:commandButton />
<lr:popupCalendar />
<lr:colorPicker />
<lr:inputHTML />


3. A custom variable resolver that adds a "portletPreferences" implied variable to the EL i.e. you can bind a field like this:


<h:inputText value="#{portletPreferences.rowsToDisplay}" />


4. A helper class: JSFPortletUtils, that contains a lot of convenience methods for accessing critial portlet and LR data (getPortletRequest(), getPortletSession(), getPortletPreferences(), setPortletMode(), getCompanyId(), getUser(), getUserRoles(), getHostCommunityId(), getTheme(), getThemeImageDir(), getLayout(), etc.)

5. A second helper base class: JSFPortletPreferenceAdapter, for making a "ViewCongiguration" managed bean that gives the Java side code quick and easy access to portlet preferences.

That's my start. I've got plans on adding other variable resolvers (to add other variables to the EL, like "themeDisplay", "portletInstanceId", etc.) I also have a "design pattern" for portlet development that includes things like integrating Spring objects and JSF managed beans, the use of "ViewConfiguration" mentioned in #5 above, etc.

Anyone else doing JSF development and would like to join the fun? Or, is there some pre-exisitng "spot" for this that I can just add to?
Michael Young
RE:
May 26, 2007 10:47 PM
Answer

Michael Young

LIFERAY STAFF

Rank: Liferay Master

Posts: 822

Join Date: August 4, 2004

Recent Posts

Hi Joel,

We're currently doing a lot of integration work with the ICEfaces distribution -- this gives you AJAX on the core components as well as the ICEfaces extended components. Check out the 4.3 trunk for a sample ICEfaces portlet.

Also I will direct Neil Griffin to this post, as he is our JSF go-to guy.
Neil Griffin
RE:
May 30, 2007 2:39 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Regular Member

Posts: 198

Join Date: July 26, 2005

Recent Posts

Joel,

As Michael indicated, we released Liferay Portal 4.3.0-RC1 yesterday, and it includes a Sample ICEfaces portlet.

While Liferay supports many different types of JSF portlets (Sun, MyFaces, etc), we are working closely with ICEsoft to ensure that ICEfaces 1.6 will provide rich/ajax portlets to the Liferay developer community. In addition, several of Liferay's out-of-the-box portlets will be refactored using ICEfaces in the future.

Regarding your contribution, I'll contact you directly. Love to see your stuff!