Skip to content
Wicket Oat Demo
Theme: 💼 Business

Oat Table Demo

Tables are styled by default in Oat.

Name Email Role Status
Alice Johnson alice@example.com Admin Active
Bob Smith bob@example.com Editor Active
Carol White carol@example.com Viewer Pending

How to use

Tables are automatically styled by Oat UI. Simply use standard <table>, <thead>, and <tbody> elements. You can use any Wicket repeater component like ListView or DataTable to populate the rows.

// Java - populating rows with a ListView
add(new ListView<>("rows", items) {
    @Override
    protected void populateItem(ListItem<Item> item) {
        item.add(new Label("name", item.getModelObject().getName()));
        item.add(new Label("email", item.getModelObject().getEmail()));
    }
});
<!-- HTML -->
<table>
    <thead>
        <tr><th>Name</th><th>Email</th></tr>
    </thead>
    <tbody>
        <tr wicket:id="rows">
            <td wicket:id="name"></td>
            <td wicket:id="email"></td>
        </tr>
    </tbody>
</table>