APACHE TOMCAT 6
APACHE TOMCAT 7
JAVASERVER FACES (JSF)
GENERAL JAVA PROGRAMMING
JAVA 8 LAMBDAS & STREAMS
AJAX & GWT
INTERMEDIATE SERVLETS & JSP
ADVANCED SERVLETS & JSP
HIBERNATE & JPA
WEB SERVICES WITH AXIS2
TUTORIALS IN CHINESE
TUTORIALS IN JAPANESE
ABOUT THE INSTRUCTOR
JSF 2 & PRIMEFACES
JAVA 7 & 8 PROGRAMMING
AJAX (w/ JQUERY, HTML5, ETC.)
RESTful WEB SERVICES
HIBERNATE & JPA
INTERMEDIATE SERVLETS & JSP
ADVANCED SERVLETS & JSP
PUBLIC TRAINING SCHEDULE
PrimeFaces Tutorial Series
PrimeFaces with JSF2 and Eclipse
Interested in live training from the author of these tutorials? See the upcoming JSF 2 and PrimeFaces training courses in Maryland, co-sponsored by Johns Hopkins. Or, contact firstname.lastname@example.org for info on customized JSF 2 or PrimeFaces courses onsite at your location. See the JSF training page for various options for the onsite courses.
Following is a series of introductory tutorials on PrimeFaces, a popular third-party component library for JSF 2. This is intended as a beginner's tutorial, aimed at developers who already know JSF 2, but who are new to PrimeFaces. It shows the most common usage of the most popular elements, but does not discuss every option or cover nearly all of the myriad PrimeFaces components. So, it is intended as a fast start for newcomers to PrimeFaces, and does not replace the PrimeFaces showcase and User's Guide for experienced PrimeFaces developers. Since each section includes exercises and exercise solutions, this can also be viewed as a self-paced introductory PrimeFaces training course. All the slides, source code, exercises, and exercise solutions are free for unrestricted use. Click on a section below to expand its content. The relatively few parts on IDE development and deployment use Eclipse, but of course none of the actual code is Eclipse-specific. These tutorials assume that you already know Java and at least the basics of JSF 2. If you don't already know JSF version 2, see the JSF 2 tutorial series. If you don't already know the Java language, please see the Java programming tutorial series. If you already have JSF or PrimeFaces experience, see the JSF and PrimeFaces jobs page.
For most types of applications, JSF 2 is now the recommended way to build Java-based Web applications, and it is dramatically better than JSF 1 in almost every way, and is both more powerful and easier to use. However, JSF 2 does not include rich GUI elements; JSF leaves this task to the third-party component libraries. PrimeFaces is at least as powerful as the competing component libraries, and is significant simpler to get started with than most of them. Depending how you measure it, PrimeFaces now possibly the most popular choice, arguably more widely used than RichFaces, IceFaces, and Oracle ADF Faces. Click on a topic below to get the detailed tutorial for that topic, download the section's source code as an Eclipse project, see exercises, get the source code for the exercise solutions, or to simply run the sample apps from that section. Practicing is the key to learning, so I strongly recommend that you try out a few of the exercises in each section before you peek at the solutions.
These tutorials are derived from Marty Hall's world-renowned live JSF 2 and PrimeFaces training courses. Customized courses on JSF and PrimeFaces (or JSF2 or PrimeFaces separately) are usually taught on-site at customer locations, but Ajax, GWT, JSF 2.0, PrimeFaces, Spring, Hibernate, RESTful Web Services, Android, Hadoop, and Java 7 training courses at public venues are periodically scheduled for people with too few developers for an onsite course. For descriptions of the various other courses that are available, please see the Java EE and Ajax training course page. To inquire about a customized training course at your location, please contact Marty at email@example.com.
This section gives an overview of PrimeFaces, compares it to other third-party JSF component libraries, surveys its capabilities, and shows you how to configure your JSF application to use it. Note: this section assumes that you already know how to create and deploy a JSF2 Dynamic Web Project in Eclipse as described in the Getting Started section of the JSF 2 tutorial series.
This section covers p:calendar, the PrimeFaces input element for collecting dates and times. It also introduces the style of programming with PrimeFaces in JSF2, and briefly summarizes the PrimeFaces versions of some of the standard JSF elements: p:commandButton, p:message, p:messages, p:fieldset, and p:ajax. Note: this and all following sections assume that you already know how to create and deploy a JSF2 Dynamic Web Project in Eclipse as described in the Getting Started section of the JSF 2 tutorial series.
This section covers p:spinner, p:slider, and p:rating, the three main PrimeFaces input element for collecting numbers. It also assumes that you are familiar with the basic style of programming in PrimeFaces (with p:commandButton, p:messages, etc.), as introduced in the section on Date Input.
The main emphasis of this section is p:autocomplete, a component for gathering strings in a textfield that has suggestions in a dropdown box. This section also covers the much simpler p:inputMask, a textfield that shows template text and only allows certain types of characters in each position.
This section discusses a variety of other PrimeFaces input elements, the most general-purpose of which is p:inplace for making text that turns into something else (usually input elements) when the user clicks on it. Also covers p:colorPicker, p:captcha, p:password (not named p:inputSecret), and p:editor. p:editor should not be used in its default configuration for apps where other users can see the rich text: the presence of the "Show Source" button allows malicious users to insert arbitrary markup, including <script> tags. Even with careful filtering, be wary of letting spammers insert images and links to their sites.
This section discusses tooltips, dialog boxes, growl messages, and other overlay/popup windows.
This section discusses how to group content in accordion panels, tabbed panels, scroll panels, panel grids (tables), and dashboard panels (panels that can be dragged and reordered).
I plan to add coverage of additional components as time permits. Email me at firstname.lastname@example.org if you have strong opinions about which features should be covered next. You can send me comments and corrections on the existing sections as well.
Source code for all examples in this tutorial as well as the exercise solutions can be downloaded from the PrimeFaces sample code repository. Code is free for completely unrestricted use. Each section above also has links to the code used in that section. You can also view the running apps online at http://apps.jsf2.com/. That site also includes WAR files for all sections, with .java source included in the WARs. The WAR files might be a good alternative for non-Eclipse users who want the source code, especially if you don't know how to import Eclipse projects into your IDE.
Looking for short hands-on training courses on JSF 2 and/or PrimeFaces taught at your company? The courses are taught by Marty Hall, an experienced instructor, developer, speaker, and well-known Java EE author, and the creator of this tutorial series. For more information, see the JSF and PrimeFaces training course page or contact Marty to arrange a course at your location. Courses are available in any country, and have been given in N. America, Central America, Europe, Asia, and Australia. Distinctive features of Marty's training:
Email for details.
The PDF files in this tutorial contain the complete text of the original PowerPoint files, so if your goal is learning this technology, just stick with this tutorial. However, as a service to instructors teaching full-semester courses at accredited universities, coreservlets.com will release the original PowerPoint files for free. Please see the instructor materials page for details.
|© 2014 coreservlets.com | Design by TBIQ | Java hosting from Kattare|