Invoices table
Status badges, amounts, row actions, selection with bulk actions, search.
A modern, lightweight Wicket component library based on the Oat UI framework.
Wicket Oat provides a simple facade to install all necessary resources and security settings in your WebApplication.init() method:
@Override
protected void init() {
super.init();
// Install Wicket Oat globally
WicketOats.install(this);
}
Calling WicketOats.install(app) performs several actions:
oat.min.css and oat.min.js using getHeaderContributorListeners().img-src data: to Wicket's strict Content Security Policy (CSP), for the icons Oat's CSS embeds as data: URLs. Nothing else is relaxed.Wicket Oat works under Wicket's default strict, nonce-based CSP: the library renders no inline scripts or style attributes, and Oat's JavaScript (dropdowns, toasts, tabs) only sets styles through the CSSOM, which CSP doesn't restrict. You don't need 'unsafe-inline' or 'unsafe-eval'.
Sources for your own content are yours to add, e.g. an image host:
getCspSettings().blocking()
.add(CSPDirective.IMG_SRC, "https://images.example.com");
If your own markup relies on inline style attributes, allow them for styles only. Browsers ignore 'unsafe-inline' while a nonce is present, so replace the directive rather than adding to it:
getCspSettings().blocking()
.remove(CSPDirective.STYLE_SRC)
.add(CSPDirective.STYLE_SRC, CSPDirectiveSrcValue.SELF, CSPDirectiveSrcValue.UNSAFE_INLINE);
Wicket Oat features a dynamic theming system based on the data-theme attribute. It supports both built-in and custom themes.
The current user's theme is kept in a cookie (cached in the session), so any session class works. Switch it from any Wicket component:
// Java
OatTheme.setCurrent(OatTheme.MIDNIGHT);
Themes are defined in CSS using variable overrides, then registered so users can choose them:
/* themes.css */
[data-theme="my-custom-theme"] {
color-scheme: dark;
--background: #123456;
--primary: #ffcc00;
}
// Java - in WebApplication.init()
WicketOats.install(this).addTheme(new OatTheme("my-custom-theme", "My Theme"));
Use the ClientSideClickBehavior to trigger Oat UI's native JavaScript functions while remaining CSP compliant. ot.toast takes (message, title, options), so pass null for the title if you only want to set variant options:
// Java
button.add(new ClientSideClickBehavior("ot.toast('Operation successful!', null, {variant: 'success'})"));
Wicket Oat follows two main patterns for implementing UI components:
ButtonBehavior, BadgeBehavior, or SpinnerBehavior that can be added to any Wicket component to apply Oat styling.OatAlert, OatDataTable, OatWizard or OatMoneyField that encapsulate both behavior and markup logic.Whole screens built from the components, as a business application would use them:
Status badges, amounts, row actions, selection with bulk actions, search.
Page header, KPI cards, description list, timeline, split button, popover.
Steps with validation, autocomplete, a date range, money fields.
Fieldsets on the grid, money and percent fields, input addons, number formats.
Sidebar sections and badges, busy buttons, confirming an action, lazy loading.
CRUD with an edit dialog, row details, cells edited in place, a column chooser and CSV export.
A folder tree and a chart of accounts as a tree grid.
Column, line, bar and donut charts in SVG, and stat cards with a trend line.
A menu bar, a resizable split layout, a list that loads as you scroll, context menus and icons.
Master-detail list and details, with notes as a message list and input.
A login form with remember-me, a forgot-password link and a safe error message.
A plain Wicket form with Oat fields and inline validation.
A phone-sized app with a bottom tab bar, a badge, and a form of date fields, radio cards and switches.
General and navigation
Overlays and feedback
Data display
Forms
Wicket Oat ships a standard Agent Skill at wicket-oat/ — a plain SKILL.md plus a references/ folder — to help you build UI faster with an AI coding agent. It gives the agent deep knowledge of the Oat API, component library, and theming system.
To install the skill:
Point your AI coding agent at the wicket-oat/ directory, or copy it into your agent's own skills folder — see the README for details.
Try asking the agent: "Add an Oat primary button that shows a success toast" or "Oat-ify this form".
Message from Java: Wicket is running!
Server time: 2026-10-14T23:52:12.350204482Z