GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — DataTables

DataTables

Jump to bottom
Martijn Dashorst edited this page Nov 22, 2026 · 5 revisions

Deprecated: this page is no longer maintained. The current documentation is at wicketstuff.org/modules/datatables/.

DataTables jQuery Plugin Integration

Overview

(from http://www.datatables.net)

DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, based upon the foundations of progressive enhancement, which will add advanced interaction controls to any HTML table. Key features:

  • Variable length pagination
  • On-the-fly filtering
  • Multi-column sorting with data type detection
  • Smart handling of column widths
  • Display data from almost any data source
  • DOM, Javascript array, Ajax file and server-side processing (PHP, C#, Perl, Ruby, AIR, Gears etc)
  • Scrolling options for table viewport
  • Fully internationalisable
  • jQuery UI ThemeRoller support
  • Rock solid - backed by a suite of 1400+ unit tests
  • Wide variety of plug-ins inc. TableTools, FixedHeader, KeyTable and more
  • And many more

Example

Take a look at a simple HTML file displaying a table with 3 columns:

<div style="width: 980px">
<table wicket:id="table" cellpadding="0" cellspacing="0" border="0" class="display" style="width: 980px">
        <thead>
                <tr>
                        <th>Column 1</th>
                        <th>Column 2</th>
                        <th>etc</th>
                </tr>
        </thead>
        <tbody>
                <tr wicket:id="rows">
                        <td wicket:id="col1">Row 1 Data 1</td>
                        <td wicket:id="col2">Row 1 Data 2</td>
                        <td wicket:id="col3">etc</td>
                </tr>
        </tbody>
</table>
</div>

Now take a look at the Java code:

DemoDatatable table = new DemoDatatable("table");
add(table);

List<String[]> rows = ...

ListView<String[]> lv = new ListView<String[]>("rows", rows) {
    @Override
    protected void populateItem(ListItem<String[]> item) {
        String[] row = item.getModelObject();

        item.add(new Label("col1", row[0]));
        item.add(new Label("col2", row[1]));
        item.add(new Label("col3", row[2]));
    }
};

table.add(lv);

The output look'n feel is exactly the same as in http://www.datatables.net

Clone this wiki locally

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.