Search in sources :

Example 21 with ColumnMenuAction

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

the class PageServices method initLayout.

protected void initLayout() {
    Form mainForm = new MidpointForm(ID_MAIN_FORM);
    add(mainForm);
    MainObjectListPanel<ServiceType> table = new MainObjectListPanel<ServiceType>(ID_TABLE, ServiceType.class) {

        @Override
        protected UserProfileStorage.TableId getTableId() {
            return UserProfileStorage.TableId.TABLE_SERVICES;
        }

        @Override
        protected List<InlineMenuItem> createInlineMenu() {
            FocusListInlineMenuHelper<ServiceType> listInlineMenuHelper = new FocusListInlineMenuHelper<ServiceType>(ServiceType.class, PageServices.this, this) {

                private static final long serialVersionUID = 1L;

                protected boolean isShowConfirmationDialog(ColumnMenuAction action) {
                    return PageServices.this.isShowConfirmationDialog(action);
                }

                protected IModel<String> getConfirmationMessageModel(ColumnMenuAction action, String actionName) {
                    return PageServices.this.getConfirmationMessageModel(action, actionName);
                }
            };
            return listInlineMenuHelper.createRowActions(getType());
        }

        @Override
        protected List<ItemPath> getFixedSearchItems() {
            List<ItemPath> fixedSearchItems = new ArrayList<>();
            fixedSearchItems.add(ObjectType.F_NAME);
            fixedSearchItems.add(AbstractRoleType.F_DISPLAY_NAME);
            fixedSearchItems.add(AbstractRoleType.F_IDENTIFIER);
            return fixedSearchItems;
        }
    };
    table.setOutputMarkupId(true);
    mainForm.add(table);
}
Also used : MainObjectListPanel(com.evolveum.midpoint.gui.api.component.MainObjectListPanel) Form(org.apache.wicket.markup.html.form.Form) MidpointForm(com.evolveum.midpoint.web.component.form.MidpointForm) ArrayList(java.util.ArrayList) MidpointForm(com.evolveum.midpoint.web.component.form.MidpointForm) UserProfileStorage(com.evolveum.midpoint.web.session.UserProfileStorage) InlineMenuItem(com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem) ColumnMenuAction(com.evolveum.midpoint.web.component.data.column.ColumnMenuAction) FocusListInlineMenuHelper(com.evolveum.midpoint.web.component.util.FocusListInlineMenuHelper) ItemPath(com.evolveum.midpoint.prism.path.ItemPath)

Aggregations

ColumnMenuAction (com.evolveum.midpoint.web.component.data.column.ColumnMenuAction)21 InlineMenuItem (com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem)19 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)18 ArrayList (java.util.ArrayList)15 ButtonInlineMenuItem (com.evolveum.midpoint.web.component.menu.cog.ButtonInlineMenuItem)12 CompositedIconBuilder (com.evolveum.midpoint.gui.impl.component.icon.CompositedIconBuilder)11 InlineMenuItemAction (com.evolveum.midpoint.web.component.menu.cog.InlineMenuItemAction)11 IModel (org.apache.wicket.model.IModel)11 ItemPath (com.evolveum.midpoint.prism.path.ItemPath)6 UserProfileStorage (com.evolveum.midpoint.web.session.UserProfileStorage)5 MainObjectListPanel (com.evolveum.midpoint.gui.api.component.MainObjectListPanel)4 SelectableBeanImpl (com.evolveum.midpoint.web.component.util.SelectableBeanImpl)4 Form (org.apache.wicket.markup.html.form.Form)4 LoadableModel (com.evolveum.midpoint.gui.api.model.LoadableModel)3 PrismContainerValueWrapper (com.evolveum.midpoint.gui.api.prism.wrapper.PrismContainerValueWrapper)3 SelectableBean (com.evolveum.midpoint.web.component.util.SelectableBean)3 IColumn (org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn)3 Model (org.apache.wicket.model.Model)3 GuiStyleConstants (com.evolveum.midpoint.gui.api.GuiStyleConstants)2 BasePanel (com.evolveum.midpoint.gui.api.component.BasePanel)2