Type Parameters:
T - Model object type
All Implemented Interfaces:
Serializable, Iterable<Component>, IEventSink, IEventSource, IFeedbackContributor, IConverterLocator, IMetadataContext<Serializable,Component>, IHeaderContributor, IPageable, IPageableItems, IRequestableComponent, IHierarchical<Component>, IClusterable

public class DataGridView<T> extends AbstractDataGridView<T>
Simple concrete implementation of AbstractDataGridView


             <tr wicket:id="rows">
               <td wicket:id="cells">
                 <span wicket:id="cell"> </span>

Though this example is about a HTML table, DataGridView is not at all limited to HTML tables. Any kind of grid can be rendered using DataGridView.

And the related Java code:

  // Application specific POJO to view/edit
  public class MyEntity {
    private String firstName;
    private String lastName;

    // getters and setters

  public class MyEntityProvider implements IDataProvider<MyEntity> {

 List<ICellPopulator<MyEntity>> columns = new ArrayList<>();
 columns.add(new PropertyPopulator<MyEntity>("firstName"));
 columns.add(new PropertyPopulator<MyEntity>("lastName"));
 add(new DataGridView<MyEntity>("rows", columns, new MyEntityProvider()));
Igor Vaynberg (ivaynberg)
See Also:
  • Constructor Details

    • DataGridView

      public DataGridView(String id, List<? extends ICellPopulator<T>> populators, IDataProvider<T> dataProvider)
      Constructor Notice cells are created in the same order as cell populators in the list
      id - component id
      populators - list of ICellPopulators used to populate cells
      dataProvider - data provider
  • Method Details