Breadcrumb Breadcrumb
Javadoc Links Javadoc Links
Example #1 - JSF 2.0 Portlet Example #1 - JSF 2.0 Portlet

Online Demo

http://www.portletfaces.org/portletfaces-bridge/examples/jsf-2.0-portlet

Binary Download

http://www.portletfaces.org/downloads/portletfaces-bridge/jsf-2.0-portlet-1.0.0-SNAPSHOT.war

SVN (trunk)

http://svn.portletfaces.org/svn/portletfaces/portlets/examples/jsf-2.0-portlet/

Description 

This is an example WAR that contains a single "Job Application" portlet that demonstrates several of the key features of JSF 2.0:

  • Uses the JSF 2.0 <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.0 <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.0 @ViewScoped annotation in order to support a rich UI with the <f:ajax /> tag
  • Managed-beans defined by marking POJOs with the JSF 2.0 @ManagedBean annotation
  • Dependency injection of managed-beans done via the JSF 2.0 @ManagedProperty annotation
Example #2 - JSF 2.0 IPC Events Portlet Example #2 - JSF 2.0 IPC Events Portlet

Online Demo

http://www.portletfaces.org/portletfaces-bridge/examples/jsf-2.0-ipc-events-portlet

Binary Download

http://www.portletfaces.org/downloads/portletfaces-bridge/jsf-2.0-ipc-events-portlet-1.0.0-SNAPSHOT.war

SVN

http://svn.portletfaces.org/svn/portletfaces/portlets/examples/jsf-2.0-ipc-events-portlet/

Description 

This is an example WAR that contains two JSF 2.0 portlets: Customers and Bookings.

  • When a customer is selected from the Customers portlet, the Customers portlet undergoes the Portlet 2.0 ACTION_PHASE and broadcasts a Portlet 2.0 event named "ipc.customerSelected" and passes a serializable Customer.java POJO instance as the payload.
  • When the Bookings portlet undergoes the Portlet 2.0 EVENT_PHASE, it receives the Portlet 2.0 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.0 event named "ipc.customerEdited" back to the Customer's portlet.