Skip to content
Wicket Oat Demo
Theme: 💼 Business

Welcome to Wicket Oat

A modern, lightweight Wicket component library based on the Oat UI framework.

General Integration

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);
}

What it does

Calling WicketOats.install(app) performs several actions:

  • Global Resources: Registers local oat.min.css and oat.min.js using getHeaderContributorListeners().
  • Security Policy: Adds 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.

Security & CSP

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);

Theming System

Wicket Oat features a dynamic theming system based on the data-theme attribute. It supports both built-in and custom themes.

Programmatic Switching

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);

Custom Theme Definition

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"));

Advanced Usage: Programmatic Toasts

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'})"));

Component Architecture

Wicket Oat follows two main patterns for implementing UI components:

  • Behaviors: Lightweight classes like ButtonBehavior, BadgeBehavior, or SpinnerBehavior that can be added to any Wicket component to apply Oat styling.
  • Components: Specialized classes like OatAlert, OatDataTable, OatWizard or OatMoneyField that encapsulate both behavior and markup logic.

Business demos

Whole screens built from the components, as a business application would use them:

Invoices table

Status badges, amounts, row actions, selection with bulk actions, search.

Customer detail

Page header, KPI cards, description list, timeline, split button, popover.

New order wizard

Steps with validation, autocomplete, a date range, money fields.

Invoice form

Fieldsets on the grid, money and percent fields, input addons, number formats.

App shell

Sidebar sections and badges, busy buttons, confirming an action, lazy loading.

Products

CRUD with an edit dialog, row details, cells edited in place, a column chooser and CSV export.

Accounts

A folder tree and a chart of accounts as a tree grid.

Reports

Column, line, bar and donut charts in SVG, and stat cards with a trend line.

Inbox

A menu bar, a resizable split layout, a list that loads as you scroll, context menus and icons.

Customers

Master-detail list and details, with notes as a message list and input.

Sign in

A login form with remember-me, a forgot-password link and a safe error message.

Time off (mobile)

A phone-sized app with a bottom tab bar, a badge, and a form of date fields, radio cards and switches.

Implemented Components

General and navigation

App Layout Mobile Layout Bottom Nav Page Header Accordion Alert Avatar Badge Breadcrumb Button Button Group Split Button Card Stat Card Pagination Tabs Wizard Master-Detail Login Form

Overlays and feedback

Dialog Confirm Dialog Dropdown Popover Toast Tooltip Feedback Panel Busy Buttons

Data display

Data Table Table Columns Row Selection Description List Timeline Message List Lazy Loading Empty State Progress Meter Spinner Skeleton

Forms

Text & HTML5 Fields Money Percent Date Range Autocomplete Suggestions Input Addons Fieldset Custom Field Message Input Choices Switch Tag Input File Upload

AI AI-Powered Development

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".

Interactive Demo

Message from Java: Wicket is running!

Server time: 2026-10-14T23:52:12.350204482Z