PrimeFaces Test


Spinner & Calendar (No Server Behavior)

This example just verifies that PrimeFaces is installed properly. The first entry should look like a number spinner, and the second should look like a textfield. If you see this, and if a calendar pops up when you click in the second field, then you correctly included the PrimeFaces JAR file and correctly added the PrimeFaces declaration to the <html...> start tag.

Choose number:
Choose date:














Spinner & Calendar (With Server Behavior)

This example shows some simple server-side behavior. In particular, it shows that the PrimeFaces input components often automatically convert types. So, in this case, the associated getter and setter of the spinner should be of type double, and the getter and setter for the calendar should be of type Date, and no user conversion is needed in either case. Also note that this example has no validation; see the later section on date and number input for a more realistic calendar example that validates the input.

Choose number:
Choose date:









All code from the coreservlets.com J2EE tutorials: JSF 2.2, PrimeFaces, Java 7 programming, Java 8 lambdas and streams, Hadoop, Ajax with jQuery, GWT, Spring, Hibernate, JPA, SOAP-based and RESTful Web Services, Android development, servlets, and JSP. There are also live instructor-led training courses on the same Java EE topics: JSF 2.2, PrimeFaces, Java 7 programming, Java 8 lambdas and streams, Hadoop, Ajax with jQuery, GWT, Spring, Hibernate, JPA, SOAP-based and RESTful Web Services, Android development, servlets, and JSP. Email info@coreservlets.com to inquire about customized versions of these courses taught onsite at your organization. Also see the JSF 2.2 tutorial, the PrimeFaces tutorial, and information about Marty Hall, the training course instructor.