Forums

RSS RSS
"Official" Liferay JSF portlet framework Flat View
Threads
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:

 1
 2<lr:table />
 3<lr:column />
 4<lr:columnLink />
 5<lr:scroller />
 6<lr:commandButton />
 7<lr:popupCalendar />
 8<lr:colorPicker />
 9<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:

1
2<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?
Flag Flag
RE:
5/26/07 10:47 PM as a reply to Joel Kozikowski.
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.
Flag Flag
RE:
5/30/07 2:39 PM as a reply to Joel Kozikowski.
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!
Flag Flag