Search in sources :

Example 21 with TablePanel

use of com.evolveum.midpoint.web.component.data.TablePanel in project midpoint by Evolveum.

the class OrgUnitAddDeletePopup method setState.

public void setState(ActionState state, AjaxRequestTarget target) {
    this.state = state;
    AjaxButton actionButton = (AjaxButton) getContent().get(ID_BUTTON_ACTION);
    actionButton.setModel(createActionButtonStringResource());
    actionButton.add(new AttributeAppender("class", getActionButtonClass()));
    target.add(actionButton);
    TablePanel panel = getTable();
    DataTable table = panel.getDataTable();
    ObjectDataProvider provider = (ObjectDataProvider) table.getDataProvider();
    provider.setQuery(getDataProviderQuery());
    target.add(panel);
}
Also used : DataTable(org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable) AjaxButton(com.evolveum.midpoint.web.component.AjaxButton) ObjectDataProvider(com.evolveum.midpoint.web.component.data.ObjectDataProvider) AttributeAppender(org.apache.wicket.behavior.AttributeAppender) TablePanel(com.evolveum.midpoint.web.component.data.TablePanel)

Example 22 with TablePanel

use of com.evolveum.midpoint.web.component.data.TablePanel in project midpoint by Evolveum.

the class ResourceListPanel method initLayout.

protected void initLayout() {
    TablePanel resources = new TablePanel("table", new ObjectDataProvider((PageBase) getPage(), ResourceType.class), initColumns());
    resources.setOutputMarkupId(true);
    add(resources);
}
Also used : ResourceType(com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType) ObjectDataProvider(com.evolveum.midpoint.web.component.data.ObjectDataProvider) PageBase(com.evolveum.midpoint.gui.api.page.PageBase) TablePanel(com.evolveum.midpoint.web.component.data.TablePanel)

Example 23 with TablePanel

use of com.evolveum.midpoint.web.component.data.TablePanel in project midpoint by Evolveum.

the class FocusTasksTabPanel method initLayout.

private void initLayout(final PageBase page) {
    Label label = new Label(ID_LABEL, new AbstractReadOnlyModel<String>() {

        private static final long serialVersionUID = 1L;

        @Override
        public String getObject() {
            if (taskDtoProvider.size() > 0) {
                return getString("pageAdminFocus.task.descriptionHasTasks");
            } else {
                return getString("pageAdminFocus.task.descriptionNoTasks");
            }
        }
    });
    add(label);
    List<IColumn<TaskDto, String>> taskColumns = initTaskColumns();
    TablePanel taskTable = new TablePanel<TaskDto>(ID_TASK_TABLE, taskDtoProvider, taskColumns);
    add(taskTable);
    taskTable.add(new VisibleEnableBehaviour() {

        @Override
        public boolean isVisible() {
            return taskDtoProvider.size() > 0;
        }
    });
}
Also used : IColumn(org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn) Label(org.apache.wicket.markup.html.basic.Label) VisibleEnableBehaviour(com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour) TablePanel(com.evolveum.midpoint.web.component.data.TablePanel)

Example 24 with TablePanel

use of com.evolveum.midpoint.web.component.data.TablePanel in project midpoint by Evolveum.

the class LoggingConfigPanel method addStandardLoggerPerformed.

private void addStandardLoggerPerformed(AjaxRequestTarget target) {
    LoggingDto dto = getModel().getObject();
    StandardLogger logger = new StandardLogger(new ClassLoggerConfigurationType());
    logger.setEditing(true);
    dto.getLoggers().add(logger);
    TablePanel loggersTable = getLoggersTable();
    adjustLoggersTablePage(loggersTable, dto);
    target.add(getLoggersTable());
}
Also used : StandardLogger(com.evolveum.midpoint.web.page.admin.configuration.dto.StandardLogger) ClassLoggerConfigurationType(com.evolveum.midpoint.xml.ns._public.common.common_3.ClassLoggerConfigurationType) LoggingDto(com.evolveum.midpoint.web.page.admin.configuration.dto.LoggingDto) TablePanel(com.evolveum.midpoint.web.component.data.TablePanel)

Example 25 with TablePanel

use of com.evolveum.midpoint.web.component.data.TablePanel in project midpoint by Evolveum.

the class PageAccounts method listSyncDetailsPerformed.

private void listSyncDetailsPerformed(AjaxRequestTarget target) {
    refreshSyncTotalsModels();
    if (resourceModel.getObject() == null) {
        warn(getString("pageAccounts.message.resourceNotSelected"));
        refreshEverything(target);
        return;
    }
    loadResourceObjectClass();
    TablePanel table = getAccountsTable();
    ObjectDataProvider provider = (ObjectDataProvider) table.getDataTable().getDataProvider();
    provider.setQuery(createObjectQuery());
    table.getDataTable().setCurrentPage(0);
    refreshEverything(target);
}
Also used : ObjectDataProvider(com.evolveum.midpoint.web.component.data.ObjectDataProvider) TablePanel(com.evolveum.midpoint.web.component.data.TablePanel)

Aggregations

TablePanel (com.evolveum.midpoint.web.component.data.TablePanel)26 ObjectDataProvider (com.evolveum.midpoint.web.component.data.ObjectDataProvider)13 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)9 IColumn (org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn)9 ListDataProvider (com.evolveum.midpoint.web.component.util.ListDataProvider)8 ArrayList (java.util.ArrayList)8 AjaxButton (com.evolveum.midpoint.web.component.AjaxButton)7 DataTable (org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable)7 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)6 List (java.util.List)5 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)4 Label (org.apache.wicket.markup.html.basic.Label)4 ObjectQuery (com.evolveum.midpoint.prism.query.ObjectQuery)3 LoggingDto (com.evolveum.midpoint.web.page.admin.configuration.dto.LoggingDto)3 ClassLoggerConfigurationType (com.evolveum.midpoint.xml.ns._public.common.common_3.ClassLoggerConfigurationType)3 PageBase (com.evolveum.midpoint.gui.api.page.PageBase)2 ObjectSearchDto (com.evolveum.midpoint.web.page.admin.configuration.dto.ObjectSearchDto)2 ConfigurationStorage (com.evolveum.midpoint.web.session.ConfigurationStorage)2 ObjectType (com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType)2 AttributeModifier (org.apache.wicket.AttributeModifier)2