This is an example Skyve project which contains a single non-admin module view, Appointment, to demonstrate the ability to include a custom PrimeFaces component in a Skyve application using the responsive renderer.
The Appointment view demonstrates the use of the PrimeFaces select many menu component to allow multiple appointment times to be selected from the list of available times.
The customisations to this project required to make this work:
- The Appointment edit.xml uses the
widgetIdattribute to define which pieces of the Skyve edit view can be inserted. - A custom xhtml page, selectMany.xhtml is added inside the
webappfolder. - The
selectMany.xhtmlpage uses thes:viewelement to insert parts of the Skyve edit view into the page, specifying thewidgetIdattribute to identify the part of the view to be inserted. This allows the page to be constructed and include the custom PrimeFaces component in the correct location. - The selectMany module
router.xmldefines a route to the custom xhtml page when the Appointment document is being requested. This is what makes Skyve load the custom xhtml page instead of the standard edit page. - A backing bean, SelectManyView.java is used by the
selectMany.xhtmlpage by specifying the managed bean name in thes:viewelement. This backing bean is responsible for providing data for the selected Appointment document to the custom PrimeFaces component.
An example implementation of the PrimeFaces select many checkbox widget is also included on the Appointment page in this application. Including this in your project is the same as following the steps required as per the Select Many Menu component above.
This application also contains an example of displaying appointments using the PrimeFaces schedule widget. This is implemented in the schedule.xhtml page.
The schedule displays appoinments saved in the database. The schedule component can be configured to allow drag and drop and allow events to be created from the schedule.
A backing bean, ScheduleView.java is used by the schedule.xhtml page by specifying the managed bean name in the s:view element. This backing bean is responsible for providing data for the schedule component.


