Liferay Faces

Reference Portlets

JSF2 Portlet
Released: February 15, 2014
Technologies: Facelets, Liferay Faces Alloy, Liferay Faces Bridge
Binary Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
Source Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
GitHub: https://github.com/liferay/liferay-faces/tree/3.2.4-ga5/demos/bridge/jsf2-portlet

Contains a single "Job Application" portlet within the WAR that demonstrates several of the key features of JSF 2:
  • Uses the JSF 2 <f:ajax /> tag on the postal (zip) code field in order to provide the ability to auto-fill fields via Ajax
  • Uses the JSF 2 <f:ajax /> tag on the show/hide comments links in order to show/hide the comments field via Ajax
  • Model managed-bean is marked with the JSF 2 @ViewScoped annotation in order to support a rich UI with the <f:ajax /> tag
  • Uses the JSF 2 <f:ajax /> tag to show navigation-rules executing without full page refreshes
  • File upload capabilities via <h:form enctype="multipart/form-data">
  • Managed-beans defined by marking POJOs with the JSF 2 @ManagedBean annotation
  • Dependency injection of managed-beans done via the JSF 2 @ManagedProperty annotation
JSF2 CDI Portlet
Released: February 15, 2014
Technologies: Facelets, Liferay Faces Alloy, Liferay Faces Bridge
Binary Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
Source Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
GitHub: https://github.com/liferay/liferay-faces/tree/3.2.4-ga5/demos/bridge/jsf2-cdi-portlet

TIP: Check out our NEW wiki article: Developing JSF Portlets with CDI

This is the same as the jsf2-portlet, except that it utilizes CDI via JBoss Weld.

JSF2 Spring Portlet
Released: February 15, 2014
Technologies: Facelets, Liferay Faces Alloy, Liferay Faces Bridge
Binary Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
Source Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
GitHub: https://github.com/liferay/liferay-faces/tree/3.2.4-ga5/demos/bridge/jsf2-spring-portlet

This is the same as the jsf2-portlet, except that it utilizes the Spring Framework for bean management and dependency injection.

ICEfaces3 Portlet
Released: February 15, 2014
Technologies: Facelets, Liferay Faces Alloy, Liferay Faces Bridge, ICEfaces
Binary Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
Source Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
GitHub: https://github.com/liferay/liferay-faces/tree/3.2.4-ga5/demos/bridge/icefaces3-portlet

Contains a single "Job Application" portlet within the WAR that demonstrates several of the key features of JSF 2 and ICEfaces:
  • Uses the ICEfaces 3 onblur="ice.se(event, this)" JavaScript API on the postal (zip) code field, which invokes ICEfaces Direct2DOM in order to provide the ability to auto-fill fields via Ajax instead of specifying update-zones with the JSF2 f:ajax tag.
  • Model managed-bean is marked with the JSF 2 @ViewScoped annotation in order to support a rich UI
  • Ajax-based file upload capabilities via <ace:fileEntry/> component tag.
  • Managed-beans defined by marking POJOs with the JSF 2 @ManagedBean annotation
  • Dependency injection of managed-beans done via the JSF 2 @ManagedProperty annotation
PrimeFaces3 Portlet
Released: February 15, 2014
Technologies: Facelets, Liferay Faces Alloy, Liferay Faces Bridge, PrimeFaces
Binary Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
Source Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
GitHub: https://github.com/liferay/liferay-faces/tree/3.2.4-ga5/demos/bridge/primefaces3-portlet

Contains a single "Job Application" portlet within the WAR that demonstrates several of the key features of JSF 2 and PrimeFaces:
  • Uses the PrimeFaces <p:calendar/> tag for a popup date selector
  • Uses the JSF 2 <f:ajax /> tag on the postal (zip) code field in order to provide the ability to auto-fill fields via Ajax
  • Uses the JSF 2 <f:ajax /> tag on the show/hide comments links in order to show/hide the comments field via Ajax
  • Model managed-bean is marked with the JSF 2 @ViewScoped annotation in order to support a rich UI with the <f:ajax /> tag
  • Uses the JSF 2 <f:ajax /> tag to show navigation-rules executing without full page refreshes
  • File upload capabilities via <h:form enctype="multipart/form-data">
  • Managed-beans defined by marking POJOs with the JSF 2 @ManagedBean annotation
  • Dependency injection of managed-beans done via the JSF 2 @ManagedProperty annotation
  • Uses the PrimeFaces p:fileUpload tag for multi-file Ajax-based file upload
  • Uses the PrimeFaces p:dataTable tag to list the uploaded files
  • Uses the PrimeFaces p:confirmDialog tag to popup a yes/no dialog to verify file deletion
PrimeFaces4 Portlet
Released: February 15, 2014
Technologies: Facelets, Liferay Faces Alloy, Liferay Faces Bridge, PrimeFaces
Binary Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
Source Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
GitHub: https://github.com/liferay/liferay-faces/tree/3.2.4-ga5/demos/bridge/primefaces4-portlet

Contains a single "Job Application" portlet within the WAR that demonstrates several of the key features of JSF 2 and PrimeFaces:
  • Uses the PrimeFaces <p:calendar/> tag for a popup date selector
  • Uses the JSF 2 <f:ajax /> tag on the postal (zip) code field in order to provide the ability to auto-fill fields via Ajax
  • Uses the JSF 2 <f:ajax /> tag on the show/hide comments links in order to show/hide the comments field via Ajax
  • Model managed-bean is marked with the JSF 2 @ViewScoped annotation in order to support a rich UI with the <f:ajax /> tag
  • Uses the JSF 2 <f:ajax /> tag to show navigation-rules executing without full page refreshes
  • File upload capabilities via <h:form enctype="multipart/form-data">
  • Managed-beans defined by marking POJOs with the JSF 2 @ManagedBean annotation
  • Dependency injection of managed-beans done via the JSF 2 @ManagedProperty annotation
  • Uses the PrimeFaces p:fileUpload tag for multi-file Ajax-based file upload
  • Uses the PrimeFaces p:dataTable tag to list the uploaded files
  • Uses the PrimeFaces p:confirmDialog tag to popup a yes/no dialog to verify file deletion
RichFaces4 Portlet
Released: February 15, 2014
Technologies: Facelets, Liferay Faces Alloy, Liferay Faces Bridge, RichFaces, RichFaces, RichFaces
Binary Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
Source Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
GitHub: https://github.com/liferay/liferay-faces/tree/3.2.4-ga5/demos/bridge/richfaces4-portlet

Contains a single "Job Application" portlet within the WAR that demonstrates several of the key features of JSF 2 and RichFaces:
  • Uses the RichFaces <rich:calendar/> tag for a popup date selector
  • Uses the <a4j:ajax /> tag on the postal (zip) code field in order to provide the ability to auto-fill fields via Ajax
  • Uses the <a4j:ajax /> tag on the show/hide comments links in order to show/hide the comments field via Ajax
  • Model managed-bean is marked with the JSF 2 @ViewScoped annotation in order to support a rich UI with the <a4j:ajax /> tag
  • Uses the <a4j:ajax /> tag to show navigation-rules executing without full page refreshes
  • File upload capabilities via <h:form enctype="multipart/form-data">
  • Managed-beans defined by marking POJOs with the JSF 2 @ManagedBean annotation
  • Dependency injection of managed-beans done via the JSF 2 @ManagedProperty annotation

Inter-Portlet Communication (IPC)

JSF2 IPC (Events) - Customers
Released: February 15, 2014
Technologies: Facelets, Liferay Faces Bridge
Binary Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
Source Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
GitHub: https://github.com/liferay/liferay-faces/tree/3.2.4-ga5/demos/bridge/jsf2-ipc-events-customers-portlet

Contains one JSF 2 portlet named "Customers" that is meant to be used with the "Bookings" portlet (see separate WAR download below).
  • When a customer is selected from the Customers portlet, the Customers portlet undergoes the Portlet 2 ACTION_PHASE and broadcasts a Portlet 2 event named "ipc.customerSelected" and passes a serializable Customer.java POJO instance as the payload.
  • When the Bookings portlet undergoes the Portlet 2 EVENT_PHASE, it receives the Portlet 2 event named "ipc.customerSelected" via the JSR 329 BridgeEventHandler mechanism. The CustomerSelectedEventHandler will trigger a JSF navigation rule that will cause the details event payload (the selected customer) to be displayed.
  • When the customer's details (such as first name / last name) are edited in the Bookings portlet, it will send a Portlet 2 event named "ipc.customerEdited" back to the Customer's portlet.
JSF2 IPC (Events) - Bookings
Released: February 15, 2014
Technologies: Facelets, Liferay Faces Bridge
Binary Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
Source Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
GitHub: https://github.com/liferay/liferay-faces/tree/3.2.4-ga5/demos/bridge/jsf2-ipc-events-bookings-portlet

Contains one JSF 2 portlet named "Bookings" that is meant to be used with the "Customers" portlet (see separate WAR download above).
  • When a customer is selected from the Customers portlet, the Customers portlet undergoes the Portlet 2 ACTION_PHASE and broadcasts a Portlet 2 event named "ipc.customerSelected" and passes a serializable Customer.java POJO instance as the payload.
  • When the Bookings portlet undergoes the Portlet 2 EVENT_PHASE, it receives the Portlet 2 event named "ipc.customerSelected" via the JSR 329 BridgeEventHandler mechanism. The CustomerSelectedEventHandler will trigger a JSF navigation rule that will cause the details event payload (the selected customer) to be displayed.
  • When the customer's details (such as first name / last name) are edited in the Bookings portlet, it will send a Portlet 2 event named "ipc.customerEdited" back to the Customer's portlet.
JSF2 IPC Public Render Parameters Portlet
Released: February 15, 2014
Technologies: Facelets, Liferay Faces Bridge
Binary Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
Source Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
GitHub: https://github.com/liferay/liferay-faces/tree/3.2.4-ga5/demos/bridge/jsf2-ipc-pub-render-params-portlet

Contains two JSF 2 portlets: Customers and Bookings.
  • When a customer is selected from the Customers portlet, the Customers portlet undergoes the Portlet 2 ACTION_PHASE and shares the public render parameter named "selectedCustomerId".
  • When the Bookings portlet undergoes the Portlet 2 RENDER_PHASE, the value of the public render parameter named "selectedCustomerId" is injected by the bridge into the BookingsModelBean, and the bookings portlet will use that value to render the bookings for the selected customer.
  • When the customer's details (such as first name / last name) are edited in the Bookings portlet, the customer data is changed in shared memory and the Customers portlet will re-render accordingly.

Utility

JSF2 Registration Portlet
Released: February 15, 2014
Technologies: Facelets, Liferay Faces Alloy, Liferay Faces Bridge
Binary Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
Source Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
GitHub: https://github.com/liferay/liferay-faces/tree/3.2.4-ga5/demos/portal/jsf2-registration-portlet

Contains a single portlet within the WAR that shows how to develop a JSF-based alternative to the out-of-the-box Liferay "Create Account" portlet. It uses Liferay Faces Alloy for UI form layout, and the <liferay-ui:captcha /> Facelet composite component from Liferay Faces Portal.

This is a fully functional Liferay portlet WAR that contains a single "Registration" portlet that demonstrates the Alloy aui: and aui-cc: tags in action.

From the screenshot you can see that there is an extra field named "Favorite Color" which does not appear in the Liferay out-of-the-box portlet. The Java code in the portlet shows how to add extra fields like this via the Liferay Expando feature.

Note: In order to use the portlet in Liferay, first it has to be deployed, and upon subsequent restart of the server, it can be accessed via the "Create Account" link in the Liferay Sign-In portlet.
JSF2 JSP Portlet
Released: February 15, 2014
Technologies: JSP, Liferay Faces Alloy, Liferay Faces Bridge
Binary Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
Source Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
GitHub: https://github.com/liferay/liferay-faces/tree/3.2.4-ga5/demos/bridge/jsf2-jsp-portlet

Contains a single "Job Application" portlet within the WAR that demonstrates several of the key features of JSF 2:
  • Model managed-bean is marked with the JSF 2 @ViewScoped annotation in order to support a rich UI with the <f:ajax /> tag
  • File upload capabilities via <h:form enctype="multipart/form-data">
  • Managed-beans defined by marking POJOs with the JSF 2 @ManagedBean annotation
  • Dependency injection of managed-beans done via the JSF 2 @ManagedProperty annotation
JSF2 Export PDF Portlet
Released: February 15, 2014
Technologies: Facelets, Liferay Faces Bridge, Flying Saucer PDF Converter
Binary Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
Source Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
GitHub: https://github.com/liferay/liferay-faces/tree/3.2.4-ga5/demos/bridge/jsf2-export-pdf-portlet

Contains a single portlet within the WAR that shows how to dynamically generate a PDF.

ICEfaces

ICEfaces3 (with 1.8 Compatibility) Portlet
Released: February 15, 2014
Technologies: Facelets, Liferay Faces Alloy, Liferay Faces Bridge, ICEfaces
Binary Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
Source Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
GitHub: https://github.com/liferay/liferay-faces/tree/3.2.4-ga5/demos/bridge/icefaces3-compat-portlet

Contains a single "Job Application" portlet that demonstrates several of the key features of ICEfaces 3, the ICEfaces 1.8 "Compatibility Components", and JSF2:
  • ICEfaces 1.8 compatibility <ice:form partialSubmit="true">...</ice:form>
  • ICEfaces 1.8 compatibility <ice:selectInputDate /> used for date field
  • ICEfaces 1.8 partialSubmit compatibility causes postal (zip) code field in order to provide the ability to auto-fill fields via Ajax
  • ICEfaces 1.8 partialSubmit compatibility enables the user to show/hide the comments field via Ajax
  • Model managed-bean is marked with the JSF2 @ViewScoped annotation in order to support a rich UI with the tag
  • Managed-beans defined by marking POJOs with the JSF2 @ManagedBean annotation
  • Dependency injection of managed-beans done via the JSF2 @ManagedProperty annotation
ICEfaces3 CRUD Portlet
Released: February 15, 2014
Technologies: Facelets, Liferay Faces Bridge, ICEfaces
Binary Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
Source Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
GitHub: https://github.com/liferay/liferay-faces/tree/3.2.4-ga5/demos/bridge/icefaces3-crud-portlet

Contains a single portlet that demonstrates how to develop a paginated ice:dataTable that leverages Create/Read/Update/Delete (CRUD) operations via mock services.
ICEfaces3 Directory Portlet
Released: February 15, 2014
Technologies: Facelets, Liferay Faces Bridge, ICEfaces
Binary Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
Source Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
GitHub: https://github.com/liferay/liferay-faces/tree/3.2.4-ga5/demos/portal/icefaces3-directory-portlet

Contains a single portlet that is an alternative to the out-of-the-box Liferay Directory portlet with a rich Ajax UI.
ICEfaces3 Documents Portlet
Released: February 15, 2014
Technologies: Facelets, Liferay Faces Bridge, ICEfaces
Binary Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
Source Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
GitHub: https://github.com/liferay/liferay-faces/tree/3.2.4-ga5/demos/portal/icefaces3-documents-portlet

Contains a single portlet with a rich Ajax UI that shows how to develop a JSF-based version of the out-of-the-box Liferay Document Library portlet.
ICEfaces3 Users Portlet
Released: February 15, 2014
Technologies: Facelets, Liferay Faces Bridge, ICEfaces
Binary Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
Source Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
GitHub: https://github.com/liferay/liferay-faces/tree/3.2.4-ga5/demos/portal/icefaces3-users-portlet

Contains a single portlet with a rich Ajax UI that shows how to develop a JSF-based alternative to the out-of-the-box Liferay User Management Library portlet.

Note:When this portlet is deployed it is added to the Control Panel, and is not available to be added to any portal pages directly.

PrimeFaces

PrimeFaces3 Users Portlet
Released: February 15, 2014
Technologies: Facelets, Liferay Faces Bridge, PrimeFaces
Binary Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
Source Downloads: 3.2.4-ga5 (Liferay 6.2.x), 3.1.4-ga5 (Liferay 6.1.x)
GitHub: https://github.com/liferay/liferay-faces/tree/3.2.4-ga5/demos/portal/primefaces3-users-portlet

Contains a single portlet with a rich Ajax UI that shows how to develop a JSF-based alternative to the out-of-the-box Liferay User Management Library portlet.

Note:When this portlet is deployed it is added to the Control Panel, and is not available to be added to any portal pages directly.