Example usage for org.apache.wicket.extensions.markup.html.repeater.data.grid PropertyPopulator PropertyPopulator

List of usage examples for org.apache.wicket.extensions.markup.html.repeater.data.grid PropertyPopulator PropertyPopulator

Introduction

In this page you can find the example usage for org.apache.wicket.extensions.markup.html.repeater.data.grid PropertyPopulator PropertyPopulator.

Prototype

public PropertyPopulator(final String property) 

Source Link

Document

Constructor

Usage

From source file:de.twenty11.skysail.client.osgimonitor.wicket.pages.bundles.dg.DataGridPage.java

License:Apache License

/**
 * constructor/*from w  ww . j a  v  a2s  . c o m*/
 */
public DataGridPage() {
    List<ICellPopulator<Bundle>> columns = new ArrayList<ICellPopulator<Bundle>>();

    columns.add(new PropertyPopulator<Bundle>("id"));
    columns.add(new PropertyPopulator<Bundle>("symboliName"));
    columns.add(new PropertyPopulator<Bundle>("lastName"));
    columns.add(new PropertyPopulator<Bundle>("homePhone"));
    columns.add(new PropertyPopulator<Bundle>("cellPhone"));

    add(new DataGridView<Bundle>("rows", columns, new SortableContactDataProvider()));
}

From source file:org.hippoecm.frontend.plugins.cms.admin.system.SystemInfoPanel.java

License:Apache License

public SystemInfoPanel(final String id, final IBreadCrumbModel breadCrumbModel) {
    super(id, breadCrumbModel);
    setOutputMarkupId(true);//from  w  w w . j  a  v a 2s .c om

    List<ICellPopulator> columns = new ArrayList<ICellPopulator>(2);
    columns.add(new PropertyPopulator("Key"));
    columns.add(new PropertyPopulator("Value"));
    add(new DataGridView("rows", columns, memoryInfo) {
        private static final long serialVersionUID = 1L;

        protected Item newRowItem(String id, int index, IModel model) {
            return new OddEvenItem(id, index, model);
        }
    });

    add(new AjaxLink("refresh") {
        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            memoryInfo.refresh();
            target.add(SystemInfoPanel.this);
        }
    });

    add(new AjaxLink("gc") {
        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            System.gc();
            memoryInfo.refresh();
            target.add(SystemInfoPanel.this);
        }
    });
}

From source file:org.hippoecm.frontend.plugins.console.menu.systeminfo.SystemInfoDialog.java

License:Apache License

public SystemInfoDialog() {
    add(new Label("label", getTitle()));

    List<ICellPopulator> columns = new ArrayList<>(2);
    columns.add(new PropertyPopulator("Key"));
    columns.add(new PropertyPopulator("Value"));
    add(new DataGridView("rows", columns, new SystemInfoDataProvider()) {
        private static final long serialVersionUID = 1L;

        protected Item newRowItem(String id, int index, IModel model) {
            return new OddEvenItem(id, index, model);
        }// w  ww. jav a  2  s  .co m
    });

    setCancelVisible(false);
    setOkLabel(new Model<>("Close"));
}