Example usage for org.apache.wicket.extensions.markup.html.repeater.data.table IColumn populateItem

List of usage examples for org.apache.wicket.extensions.markup.html.repeater.data.table IColumn populateItem

Introduction

In this page you can find the example usage for org.apache.wicket.extensions.markup.html.repeater.data.table IColumn populateItem.

Prototype

void populateItem(final Item<ICellPopulator<T>> cellItem, final String componentId, final IModel<T> rowModel);

Source Link

Document

Method used to populate a cell in the DataGridView Implementation MUST add a component to the cellItem using the component id provided by componentId argument, otherwise a WicketRuntimeException will be thrown

Usage

From source file:wickettree.util.MultiColumn.java

License:Apache License

public void populateItem(Item<ICellPopulator<T>> cellItem, String componentId, IModel<T> rowModel) {
    IColumn<T> column = getColumn(getObjectClass(rowModel));

    if (column == null) {
        cellItem.add(new WebMarkupContainer(componentId) {
            public boolean isVisible() {
                return false;
            };// w  w  w  .j  a va  2s  .c  o m
        });
    } else {
        column.populateItem(cellItem, componentId, rowModel);
    }
}