Monday, January 28, 2013

Liferay with Prime Faces Version 1.0

What is Liferay Portal?
Liferay Portal is a free as well open source Java based portal. Liferay Portal allows end user to create site. Liferay Portal comes with 6o OOTB Portlets. Liferay Portal development supports various frameworks such as Spring, Struts, Hibernate, JSF, Rich Faces, Prime Faces etc. for creation of plugin based portlet development. Liferay offers a sophisticated programming interface for developers, no programming skills are required for basic website installation and administration.

What is Prime Faces?
Basically Prime Faces is a lightweight open source component suite for Java Server Faces 2.0.

Benefits of Prime Faces 
(Source: http://www.primefaces.org/showcase/ui/home.jsf)
  • Rich set of components (Html Editor, Dialog, AutoComplete, Charts and many more).
  • Built-in Ajax based on standard JSF 2.0 Ajax APIs.
  • Lightweight, one jar, zero-configuration and no required dependencies.
  • Native Ajax Push/Comet support.
  • Mobile UI kit to create mobile web applications for handheld devices.(I Phone, Palm, Android, Blackberry, Windows Mobile and more)
  • Skinning Framework with 30+ built-in themes and support for visual theme designer tool.
  • Extensive documentation with 450+ pages of User's Guide.
  • Large, vibrant and active user community.
  • Developed with "passion" from application developers to application developers.
Using Prime Faces with Liferay
In this post, I am going to explain Prime Faces demo with Liferay Portal 6.1.
Contains a single "Job Application" portlet within the WAR that demonstrates several of the key features of JSF 2 and PrimeFaces:
  • PrimeFaces <p:calendar/>
  • JSF 2 <f:ajax /> tag on the postal (zip) code field via Ajax
  • JSF 2 <f:ajax /> tag on the show/hide comments via Ajax
  • Model managed-bean is marked with the JSF 2 @ViewScoped
  • Managed-beans defined by marking POJOs with the JSF
  • Dependency injection of managed-beans done via the JSF
  • PrimeFaces p:fileUpload tag, PrimeFaces p:dataTable tag ,PrimeFaces p:confirmDialog tag
Package Structure of newly created PrimeFaces Portlet

Requires files for Prime Faces Portlet
  • Faces-config.xml
  • Portlet.xml
  • Web.xml
  • Download below java class from this URL for executing Prime Faces based “Job Application”.
    • Bean Class
    • POJO Class
    • Utility Class
Do ant compile from your Eclipse IDE and then deploy it in your application server.

No comments:

Post a Comment