Rich Table Views (juneau-console-views)
juneau-console-views is the browser-side toolkit behind the console's table cards: a server-driven table
view with search, sort, paging, a column chooser, saved View Settings, row actions, bulk mutation, cell popovers,
row-detail regions, async-job streaming and shareable links. The server describes a view with plain beans and
annotations; a first-party JavaScript runtime (juneau-views.js and its companions) draws it.

Most adopters never touch the view beans directly. You author a <@card type="datatables"> catalog in a
FreeMarker template (see Building a Console Page) and the chrome lifts it into
the view contract for you. This section documents what that catalog can express, the security model behind it, and
the JuneauViews JavaScript API for pages that need to go further.
| Page | Covers |
|---|---|
| Catalog and Columns | The datatables catalog, Column, search types and operators, FieldFormat, FieldSpan. |
| Row Actions and Bulk Mutation | RowAction, SelectionDef, BulkMutateDef, ActionResult, IdempotencyKey, WritePermit. |
| Renderers and Cell Popovers | Render, built-in renderer ids, CellPopover, custom renderers. |
| Security Model | Sink allowlists, CSRF and loopback boundary, same-origin rules. |
| JavaScript API | window.JuneauViews namespaces and the asset load order. |
| View Settings and Shareable Links | The View Settings dialog, page-state persistence, Copy link and ?state=. |
| Datatable View Settings | Dialog tabs and columnConfig.tabs, the schemaVersion guard, settings applied on load, ordered Sort, auto-refresh, Copy link. |
| Regions | RegionDef, populators, row-detail regions, page-slot regions. |
| Async Jobs | AsyncJobsMixin, AsyncJobRegistry, SSE progress and cancel. |
| Icons and Sprites | JuneauViews.icons, the bundled symbol sprites, overriding icons. |
| Terminal View Region | TerminalViewMixin, TerminalViewLog, FileTerminalViewSource, the report readers, the terminal-view card and region. |
Modules and mixins
| Module | Mixin / class | Serves |
|---|---|---|
juneau-console-views | ViewsMixin | /juneau-views.js, -renders.js, -icons.js, -search.js, -pagestate.js, -urlstate.js, -ribbon.js, -regions.js, -helpers.js, -config.js, -terminal-view.js, the CSS, and the symbol sprites. |
juneau-console-views | AsyncJobsMixin | /juneau-jobs/{jobId}/stream and /juneau-jobs/{jobId}/cancel. |
juneau-console-datatables | DataTablesMixin | /juneau-datatables.js, the browser glue for server-side processing. |
juneau-rest-server | WebJarsMixin | /webjars/*: the jQuery and DataTables WebJars. |
Every datatables card loads juneau-datatables.js (from DataTablesMixin) and jQuery and DataTables (from
WebJarsMixin) before juneau-views.js, in client and server mode. If the host composes neither, those URLs 404 and
the table fails loudly. See Card Asset Dependencies.
@Rest(
path="/console",
mixins={ViewsMixin.class, ConsoleChromeMixin.class, DataTablesMixin.class, WebJarsMixin.class}
)
public class ConsoleResource extends BasicRestServlet {}
Contract versions
The toolkit has three independent, versioned wire contracts, plus the page contract owned by the chrome. Each one is checked separately, and a mismatch fails loudly rather than degrading silently.
| Contract | Key | Current | Owner | Constant |
|---|---|---|---|---|
Page contract (JSON island #juneau-page) | contractVersion | "1" | PageCapture / juneau-console.js | PageCapture writes it; see Admin-Console Chrome |
View metadata (VIEW_META sidecar) | contractVersion | "5" | ViewsMixin | ViewsMixin.CONTRACT_VERSION |
Card slot envelope (SLOT_META) | contractVersion | "1" | ViewsMixin | ViewsMixin.SLOT_CONTRACT_VERSION |
| Bar envelope | contractVersion | "1" | ViewsMixin | ViewsMixin.BAR_CONTRACT_VERSION |
Regions carry their own RegionDef.CONTRACT_VERSION ("1"), independent of all of the above.
ViewsMixin.HEADER_CONTRACT_VERSION is also "1". ActionResult and BulkMutateDef carry their own
CONTRACT_VERSION ("1" each) for the action-result and bulk-mutate wire shapes.
Omit and inject
You do not write any of these numbers by hand. When a <@card type="datatables"> catalog is lifted into the
contract, the chrome injects the current VIEW_META and slot versions for you; a catalog should omit
contractVersion entirely.
A body that is itself a pre-built slot envelope (a top-level view object) is rejected at render time; author
the catalog form and let the chrome add the envelope.
ConsoleTemplateValidator still reports a literal view.contractVersion that differs from the runtime's
(view-contract-version), but such a body no longer renders, so the safe practice is simply to omit the key.