Search in sources :

Example 11 with DataTable

use of org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable in project midpoint by Evolveum.

the class TablePanel method setStyle.

public void setStyle(String value) {
    Validate.notEmpty(value, "Value must not be null or empty.");
    DataTable table = getDataTable();
    table.add(new AttributeModifier("style", new Model(value)));
}
Also used : DataTable(org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable) AbstractReadOnlyModel(org.apache.wicket.model.AbstractReadOnlyModel) Model(org.apache.wicket.model.Model) IModel(org.apache.wicket.model.IModel) AttributeModifier(org.apache.wicket.AttributeModifier)

Example 12 with DataTable

use of org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable in project midpoint by Evolveum.

the class CheckBoxColumn method populateItem.

@Override
public void populateItem(final Item<ICellPopulator<T>> cellItem, String componentId, final IModel<T> rowModel) {
    IModel<Boolean> selected = getCheckBoxValueModel(rowModel);
    CheckBoxPanel check = new CheckBoxPanel(componentId, selected, enabled) {

        @Override
        public void onUpdate(AjaxRequestTarget target) {
            DataTable table = findParent(DataTable.class);
            onUpdateRow(target, table, rowModel);
        //updating table row
        //                target.add(cellItem.findParent(SelectableDataTable.SelectableRowItem.class));
        }
    };
    check.setOutputMarkupId(true);
    cellItem.add(check);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) DataTable(org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable)

Example 13 with DataTable

use of org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable in project midpoint by Evolveum.

the class CheckBoxHeaderColumn method getHeader.

@Override
public Component getHeader(final String componentId) {
    final IModel<Boolean> model = new Model<Boolean>(false);
    CheckBoxPanel panel = new CheckBoxPanel(componentId, model, getEnabled()) {

        @Override
        public void onUpdate(AjaxRequestTarget target) {
            DataTable table = findParent(DataTable.class);
            boolean selected = model.getObject() != null ? model.getObject() : false;
            onUpdateHeader(target, selected, table);
        }
    };
    panel.setOutputMarkupId(true);
    panel.add(new VisibleEnableBehaviour() {

        @Override
        public boolean isVisible() {
            return CheckBoxHeaderColumn.this.isCheckboxVisible();
        }
    });
    return panel;
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) DataTable(org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable) SelectableDataTable(com.evolveum.midpoint.web.component.data.SelectableDataTable) Model(org.apache.wicket.model.Model) IModel(org.apache.wicket.model.IModel) VisibleEnableBehaviour(com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)

Example 14 with DataTable

use of org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable in project midpoint by Evolveum.

the class PageCertDecisions method searchFilterPerformed.

private void searchFilterPerformed(AjaxRequestTarget target) {
    ObjectQuery query = createCaseQuery();
    Table panel = getDecisionsTable();
    DataTable table = panel.getDataTable();
    CertWorkItemDtoProvider provider = (CertWorkItemDtoProvider) table.getDataProvider();
    provider.setQuery(query);
    provider.setNotDecidedOnly(Boolean.TRUE.equals(showNotDecidedOnlyModel.getObject()));
    table.setCurrentPage(0);
    target.add(getFeedbackPanel());
    target.add((Component) getDecisionsTable());
}
Also used : DataTable(org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable) Table(com.evolveum.midpoint.web.component.data.Table) DataTable(org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable) CertWorkItemDtoProvider(com.evolveum.midpoint.web.page.admin.certification.dto.CertWorkItemDtoProvider) ObjectQuery(com.evolveum.midpoint.prism.query.ObjectQuery)

Example 15 with DataTable

use of org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable in project midpoint by Evolveum.

the class ObjectSelectionPanel method updateTablePerformed.

public void updateTablePerformed(AjaxRequestTarget target, ObjectQuery query) {
    TablePanel table = getTablePanel();
    DataTable dataTable = table.getDataTable();
    ObjectDataProvider provider = (ObjectDataProvider) dataTable.getDataProvider();
    provider.setQuery(query);
    target.add(this, WebComponentUtil.getPageBase(this).getFeedbackPanel(), table);
}
Also used : DataTable(org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable) ObjectDataProvider(com.evolveum.midpoint.web.component.data.ObjectDataProvider) TablePanel(com.evolveum.midpoint.web.component.data.TablePanel)

Aggregations

DataTable (org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable)20 ObjectDataProvider (com.evolveum.midpoint.web.component.data.ObjectDataProvider)10 Table (com.evolveum.midpoint.web.component.data.Table)7 TablePanel (com.evolveum.midpoint.web.component.data.TablePanel)7 ObjectQuery (com.evolveum.midpoint.prism.query.ObjectQuery)3 IModel (org.apache.wicket.model.IModel)3 Model (org.apache.wicket.model.Model)3 ConfigurationStorage (com.evolveum.midpoint.web.session.ConfigurationStorage)2 TasksStorage (com.evolveum.midpoint.web.session.TasksStorage)2 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)2 AttributeAppender (org.apache.wicket.behavior.AttributeAppender)2 AbstractReadOnlyModel (org.apache.wicket.model.AbstractReadOnlyModel)2 LoadableModel (com.evolveum.midpoint.gui.api.model.LoadableModel)1 AjaxButton (com.evolveum.midpoint.web.component.AjaxButton)1 BaseSortableDataProvider (com.evolveum.midpoint.web.component.data.BaseSortableDataProvider)1 RepositoryObjectDataProvider (com.evolveum.midpoint.web.component.data.RepositoryObjectDataProvider)1 SelectableDataTable (com.evolveum.midpoint.web.component.data.SelectableDataTable)1 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)1 CertWorkItemDtoProvider (com.evolveum.midpoint.web.page.admin.certification.dto.CertWorkItemDtoProvider)1 AccountDetailsSearchDto (com.evolveum.midpoint.web.page.admin.configuration.dto.AccountDetailsSearchDto)1