reiern70 opened a new pull request, #1637:
URL: https://github.com/apache/wicket/pull/1637
Adds `DynamicDataTable` to wicket-extensions: a table that renders only the
`<table>` and its header on the server. The rows come as JSON from the table's
own endpoint and each cell is a column template evaluated in the browser
(built-in `{{path}}` / `{{{path}}}` engine, or Handlebars).
`DataTable` renders every cell as a component, so each refresh re-renders
the whole body on the server, and a click on a row that has changed or gone
since it was rendered targets a component that no longer exists.
`DynamicDataTable` looks the clicked row up by its key through
`IDynamicDataProvider` instead, and calls `onNotFoundAction()` if the row is
gone.
Commits:
- **Add DynamicDataTable**: column templates, from code or from `.html`
resources resolved like markup (style, variation, locale); Ajax actions via
`data-dt-action`; paging; pushing over web sockets with
`IWebSocketLightWeightMessage`.
- **Action column contributor** downloading the row as JSON.
- **Repaint single rows over web sockets**, with a progress bar column and a
generic `ProgressBar` (GitHub issue #1635).
- **Sorting, row numbers, column resizing and paging options.**
- **CollapsiblePanel**: a native `<details>`/`<summary>` panel that works
without JavaScript and under a strict CSP (GitHub issue #1636).
- **Row selection and typed row keys** (`IIdentifiable<K>`).
The examples get a DynamicDataTable page (repeater examples) using all of
the above.
Draft: a further round (shared themes, toolbars with pluggable actions and
CSV export, an indeterminate progress bar, an Extensions examples index) is
still being reviewed locally and will be added to this branch.
Templates are trusted markup written into the page as is. The Javadoc of
`IDynamicColumn` says they have to be authored by the developer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]