#{extends 'jqueryui/layout.html'/}
This module provides working examples of jQuery UI widgets, integrated with a Play appliction.
This is not a Play module in the normal sense, providing additional server-side functionality that your application will directly depend on.
Instead, this module provides re-usable view template and JavaScript snippets that you can use, as well us sample controller actions for the server-side parts.
jQuery UI widgets
This module includes code samples for several widgets.
-
Accordion
- collapsible content sections that are loaded via Ajax when opened.
-
Autocomplete
- Ajax suggest-while-you-type for form controls.
-
Date picker
- date selector pop-up that uses the application date format and language.
-
Dialog
- dialogue box that can be used as a selector pop-up for form values.
-
Progressbar
- progress indicator that uses web sockets to report a job’s completion percentage.
-
Tabs
- content sections that are loaded via Ajax when selected.
In general, each widget requires several separate code snippets:
- A view template that contains static undecorated HTML.
- A JavaScript file that uses jQuery to apply the widget to the HTML.
- A controller action that handles Ajax requests from the widget, and either renders an template or directly generates a JSON response.
- A template for the Ajax response, in the case that the controller renders one.
Each of these sections of code is usually very small; you just have to know how to wire them together.