Components and behaviors
Create components with new, like any Wicket component, or apply
Oat.Behaviors to a component you already have —
composition over inheritance, your choice per case.
Apache Wicket × Oat UI
A modern, themeable component library for Apache Wicket — built on Oat's ultra-lightweight, semantic CSS and JS: real HTML elements that screen readers and keyboards already understand. No utility-class soup, no client framework, just Wicket the way you already write it.
New in 0.6.0 Out now: fixes from a review of the whole library, for multi-select fields, sign-out, date columns, lazy loading and fields and menus in dialogs. See what changed.
Why Wicket Oat
Wicket Oat wraps Oat's semantic HTML/CSS/JS in idiomatic Wicket
Components and Behaviors, so you get a current, themeable
UI without leaving Wicket's component model.
Create components with new, like any Wicket component, or apply
Oat.Behaviors to a component you already have —
composition over inheritance, your choice per case.
Oat styles real HTML elements by default. ~10KB of CSS and JS total, no build step, no bundler, no utility-class soup in your markup.
19 built-in themes, remembered per user in a cookie, plus your own themes registered in one line — full CSS custom-property theming to match your brand.
Every component is an ordinary WebMarkupContainer, Panel,
or Behavior subclass — test it with WicketTester
like anything else in your app.
Native HTML elements, form fields wired to their error messages, full keyboard use and ARIA states built in — no extra markup on your side. How it works
Fields take their model from a CompoundPropertyModel and their label
from .properties, by id. Validation errors show inline, and
feedback panels and toasts update themselves over Ajax.
Works under Wicket's default nonce-based Content Security Policy: no inline
scripts or styles, no 'unsafe-inline', no 'unsafe-eval'.
Data tables with row actions and bulk operations, page headers, KPI cards, detail views, master-detail screens, a wizard, a sign-in form, comments, server-side autocomplete, money and date-range fields — the screens line-of-business applications are made of.
The few texts the library renders itself come in English, German, Spanish, French, Italian, Japanese, Dutch and Portuguese, following each user's locale like Wicket's own validation messages.
How it works
Wicket Oat components are Wicket components: a page is still a tree of them, and each renders plain HTML that Oat's CSS styles. Build one invoices page in seven steps and watch the tree, the code and the page grow. The page in the panel is live Oat markup.
OatAppLayoutA page of yours extends OatAppLayout, a Wicket WebPage.
Its markup is the frame: Oat's data-sidebar-layout grid with a top bar, a sidebar
and <main>, behind a “Skip to content” link. Your page's markup
goes into <main>, inside <wicket:extend>.
In an app, the hooks of the next steps sit in a base page of yours that every page extends.
public class InvoicesPage extends OatAppLayout { @Override protected IModel<String> appNameModel() { return Model.of("Acme Billing"); }}<wicket:extend> <!-- rendered inside <main> --></wicket:extend>The frame is OatAppLayout's own markup, the grid Oat styles.
sidebarMenuItemsModel() lists the pages. Each MenuItem becomes
a link, and the current page's is marked aria-current. Groups fold into
<details>, a badge shows a count, and pages the user may not open are left out.
@Overrideprotected IModel<List<MenuItem>> sidebarMenuItemsModel() { return Model.ofList(List.of( MenuItem.of("Dashboard", DashboardPage.class), MenuItem.of("Invoices", InvoicesPage.class) .withBadge(() -> invoices.countOpen()), MenuItem.of("Customers", CustomersPage.class)));}One link per menu item; aria-current marks this page.
newTopNavExtra(id) fills the top bar's corner. An OatUserMenu
shows the user's picture or initials and name, and opens a menu with their email, links of
yours and “Sign out”. While nobody is signed in, it is a “Sign in” link.
@Overrideprotected Component newTopNavExtra(String id) { OatUserMenu user = new OatUserMenu(id, () -> session.userName()); user.setDetail(() -> session.email()); user.addLink("Settings", SettingsPage.class).setIcon("settings"); return user;}OatUserMenu renders into the top bar's topNavExtra.
The page adds its components with add(...), as any Wicket page does.
OatPageHeader gives it a title and actions, OatDataTable a sortable,
pageable table with Oat columns. Each renders plain HTML that Oat's CSS styles, so there is no
CSS of your own to write.
public InvoicesPage() { add(new OatPageHeader("header", "Invoices")); List<IColumn<Invoice, String>> columns = List.of( new LambdaColumn<>(Model.of("Number"), Invoice::number), new LambdaColumn<>(Model.of("Customer"), Invoice::customer), new OatBadgeColumn<>(Model.of("Status"), Invoice::status, Invoice::variant), new OatNumberColumn<>(Model.of("Total"), Invoice::total)); add(table = new OatDataTable<>("invoices", columns, provider, 10));}<wicket:extend> <header wicket:id="header"></header> <div wicket:id="invoices"></div></wicket:extend>Plain <header> and <table>, styled by Oat.
An OatDialog is a native <dialog> with a form in it.
A row's “Edit” points the dialog's model at that invoice and opens it over Ajax.
Its fields are Oat fields: a label, the input, and a hint or an error under it.
OatDialog edit = new OatDialog("edit", "Edit invoice") { @Override protected void onConfirm(AjaxRequestTarget target) { invoices.save(invoice.getObject()); target.add(table); }};Fragment fields = new Fragment(OatDialog.CONTENT_ID, "fields", this, new CompoundPropertyModel<>(invoice));fields.add(new OatTextField<String>("customer").setRequired(true));add(edit.setContent(fields)); actions.addAction("Edit", (target, row) -> { invoice.setObject(row); edit.open(target);});A native <dialog> with its own form, opened over Ajax.
“Confirm” sends the dialog's form over Ajax, and Wicket validates it on the
server. With the customer left empty, the field shows its error by itself: the response sets the
message and aria-invalid, so the input keeps its focus and a screen reader announces
the message. A valid confirm saves and re-renders only the table: target.add(table).
<ajax-response> <evaluate>WicketOat.fieldFeedback("customer7", "feedback8", "'Customer' is required.", true)</evaluate></ajax-response>Only the message and aria-invalid change; the input keeps its focus.
The look comes from Oat's CSS variables. OatThemeSwitcher in the sidebar's
footer sets one data-theme attribute on <html>, kept in a cookie,
and every component follows: 19 built-in themes, light and dark, or your own.
@Overrideprotected Component newSidebarFooter(String id) { return new OatThemeSwitcher(id);}One data-theme attribute; every component follows.
PageParameters and translated labels,
groups stay open while one of their pages is shown, and target.add(getSidebar())
updates a badge over Ajax. newMenuLink(id, item) can make an entry an AjaxLink.OatMobileLayout
puts a bottom tab bar under the content instead.OatAppLayout gets the
theme, density and language from add(new OatHtml("html")); bookmarkable pages
pass their PageParameters to super(...).Accessibility
Oat styles native elements — <button>, <dialog>,
<details>, <label>, <table> —
instead of rebuilding them out of <div> elements. Screen readers, keyboards
and browser zoom already know how they work. Wicket Oat renders the same native
markup and adds the ARIA attributes that HTML can't express on its own.
Labels belong to their inputs, required fields are marked, and a validation
error appears next to its field in a role="status" region, linked
through aria-describedby with aria-invalid set.
After an Ajax submit, a field's error appears in place:
the text of its role="status" region changes, so screen readers announce
it, and the input keeps its focus and what was typed.
Dialogs are native modal dialogs: focus stays inside and Escape closes them. Menus and context menus work with the arrow keys, Shift+F10 or the Menu key and give focus back when they close. Tree nodes expand with real buttons, and cells edited in place save with Enter and cancel with Escape.
OatAppLayout starts with a
“Skip to content” link past the navigation.
The stars of OatRatingField
are radio buttons, so the arrow keys move between them.
So are the chips of OatFilter, and a
drawer opens with its first field focused.
aria-current marks the current page in navigation, breadcrumbs and
pagination, aria-sort the sorted column, aria-expanded
an open tree node, and aria-busy a button whose Ajax request is
still running.
A rating is read as “4.5 out of
5 stars”, a status dot by its name, such as “Online”, and a progress
ring as a progressbar with its value.
Buttons that open a menu say so
(aria-haspopup), and the user menu's button is named
“Account:” and the user's name.
Every chart comes with its numbers as a data table, and its marks carry text titles. Icons are hidden from screen readers unless you give them a label, and then they are announced by it.
Animations stop for users who ask for reduced motion, keyboard focus is always visible, and layouts reflow down to phone width, so zooming in doesn't mean scrolling sideways.
The texts only screen readers hear, such as “Toggle menu” or “Expand”, come in eight languages and follow each user's locale, like every other text the library renders.
OatAppLayout sets the page's
lang, so screen readers pronounce it in the right language.
Wicket Oat gives you accessible building blocks, not a certificate: whether an application meets WCAG 2.1 AA also depends on its content and labels, the colors of the theme it uses, and testing with real assistive technology.
Get Started
<dependency>
<groupId>dev.jbaby</groupId>
<artifactId>wicket-oat-core</artifactId>
<version>0.6.0</version>
</dependency>
public class MyWicketApplication extends WebApplication {
@Override
protected void init() {
super.init();
WicketOats.install(this); // adds Oat's CSS/JS; returns OatSettings for themes
}
}
add(new OatAlert("notice", "Welcome back!", OatVariant.SUCCESS));
add(OatButton.onClick("save", "Save changes", target ->
Oat.toast(target, "Saved!", OatVariant.SUCCESS)));
<div wicket:id="notice"></div>
<a wicket:id="save"></a>
Oat components are plain Wicket components, created with
new. Those driven by a callback, like a button's click, also
have a static factory taking a lambda, like Wicket's own
AjaxLink.onClick(...), so you don't have to subclass them.
Want the full walkthrough? See the Build a Contact Form tutorial, or read the user guide for every component in detail.
Component Showcase
Not screenshots — this page loads the same Oat 1.0 build the library vendors, so what you see here is exactly what renders in your app.
New in 0.6.0 0.6.0, the current release, is a release of fixes and adds no components. The changelog lists them, with notes on upgrading from 0.5.x.
Any HTML can live inside.
Press Ctrl + K to search, or Shift+? for all shortcuts.
A themeable component library for Apache Wicket, built on Oat.
Customer since 2019 · Vienna
Order #1001 has shipped
Drag the corner of the list to resize it.
Quote Q-1003 approved
Manage your account here.
Change your password here.
| Name | Status |
|---|---|
| Invoice #1042 | Paid |
| Invoice #1043 | Due |
INV-1019 · €2,612.50
| Category | Value |
|---|---|
| Jul | 104,900 |
| Aug | 97,600 |
| Sep | 112,300 |
| Oct | 118,400 |
| Nov | 121,900 |
| Dec | 128,400 |
| Category | 2026 | 2025 |
|---|---|---|
| Jul | 104,900 | 88,700 |
| Aug | 97,600 | 84,300 |
| Sep | 112,300 | 95,600 |
| Oct | 118,400 | 99,100 |
| Nov | 121,900 | 104,200 |
| Dec | 128,400 | 111,800 |
| Category | Value |
|---|---|
| DACH | 512 |
| Benelux | 242 |
| Nordics | 198 |
| France | 133 |
| Name | Price | |
|---|---|---|
| Docking station | €189.00 | |
| Laptop 14" | €1,299.00 |
| Product | Stock | |
|---|---|---|
| Backup, 1 TB | ||
Encrypted off-site backup, billed monthly. | ||
| Docking station | ||
Oat Granola
4.3 from 128 reviews
Oat Milk
No reviews yet
Click a chip, or move between them with the arrow keys.
The Wicket way
Wicket Oat works the way Wicket itself does: dialogs like
ModalDialog, data tables like AjaxFallbackDefaultDataTable,
lambda factories like AjaxLink.onClick, and tests that read like the
markup.
Set the content with setContent(...) and
OatDialog.CONTENT_ID. The server knows whether the dialog is open,
onClose runs however it closed — Cancel, Escape, the backdrop
or a confirm — and target.add(dialog) keeps an open dialog open.
OatDrawer is a dialog that slides in from an
edge, and a dialog closed without confirming shows its models again the next time.
A dialog opened again in
onConfirm, such as a second question, stays open, and Enter in a
page's field can't click a button of a closed dialog.
Sorting and paging re-render only the table, falling back to plain links without
JavaScript. OatDataTable is pageable like a DataTable,
so table.setCurrentPage(0) works, and a selection can keep just ids:
new OatSelectionColumn<>(selectedIds, Invoice::getId).
The selected rows can be loaded by their ids, so bulk actions also get those a search hides.
A field's input sits at "email:input" instead of
"email:container:field", in FormTester and in the
posted name. getInput() returns it, and
addToInput(...) puts an autocomplete or
maxlength right on the <input>.
No onError that adds the form: fields show the
errors of an Ajax submit themselves, and new OatFeedbackPanel(id, form)
shows the form's own errors next to it, once.
Components driven by a callback get factories on their own classes:
OatButton.onClick(...), OatSubmitButton.onSubmit(...),
OatAccordion.of(...). Everything else is created with
new, and hooks are named newXxx(id).
add(new OatHtml("html")) gives any page the theme, density and
language the layouts set, and OatThemeSwitcher no longer makes a
page stateful, so a sign-in page can show it and stay stateless.
Signing in with OatLoginForm returns to the page the user was going
to, and a dialog inside a page's form no longer blocks that form's submit.
Theming
Click a theme below to preview it live on this entire page — the same
data-theme mechanism OatThemeSwitcher uses in your app,
where the user's choice is remembered in a cookie (and works with any session
class).
Business and Business Dark, two sober themes for line-of-business apps with status colors that meet WCAG AA, and a compact density for data-heavy screens.
// Switch the current user's theme (kept in a cookie)
OatTheme.setCurrent(OatTheme.NORD);
// In init(): the default theme, and your own themes defined in CSS
WicketOats.install(this)
.setDefaultTheme(OatTheme.LIGHT) // or null to follow the browser
.addTheme(new OatTheme("brand", "Brand", "π·οΈ"))
.setDensity(OatDensity.COMPACT); // tighter spacing app-wide
// Pin one component to a theme, whatever the user chose
card.add(Oat.Behaviors.theme(OatTheme.LIGHT));
// Keep Oat's own spacing in one part of a compact app
form.add(Oat.Behaviors.density(OatDensity.DEFAULT));
AI-Powered Development
Wicket Oat ships a standard Agent Skill
— a plain SKILL.md plus a references/ folder — giving the agent
deep knowledge of the Oat API, component library, and theming system. It works with any tool that
supports this directory-based skill convention. Other agents get the same knowledge from
llms.txt and the rules in the guide.
It lives in the repo at wicket-oat/
(SKILL.md + references/).
Copy it into your agent's own skills folder — for example, with Claude Code:
cp -r wicket-oat .claude/skills/wicket-oat
Check your agent's own documentation for how it discovers or loads skills.
Once installed, try: “Add a primary Oat button that shows a success toast on click.” or “Turn this standard Wicket Label into an Oat success badge.”