Skip to content

Example repository for implementing a select many in a Skyve application

Notifications You must be signed in to change notification settings

benpetito/select-many

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Select Many and Schedule Widgets Skyve Example

Select Many Menu

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.

Select Many Example

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.

Steps Required

The customisations to this project required to make this work:

  1. The Appointment edit.xml uses the widgetId attribute to define which pieces of the Skyve edit view can be inserted.
  2. A custom xhtml page, selectMany.xhtml is added inside the webapp folder.
  3. The selectMany.xhtml page uses the s:view element to insert parts of the Skyve edit view into the page, specifying the widgetId attribute 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.
  4. The selectMany module router.xml defines 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.
  5. A backing bean, SelectManyView.java is used by the selectMany.xhtml page by specifying the managed bean name in the s:view element. This backing bean is responsible for providing data for the selected Appointment document to the custom PrimeFaces component.

Select Many Checkbox Component

Schedule Example

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.

Schedule Component

Schedule Example

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.

About

Example repository for implementing a select many in a Skyve application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published