Search in sources :

Example 1 with HeaderMenuAction

use of com.evolveum.midpoint.web.page.admin.configuration.component.HeaderMenuAction in project midpoint by Evolveum.

the class OrgMemberPanel method createManagersHeaderInlineMenu.

private List<InlineMenuItem> createManagersHeaderInlineMenu() {
    List<InlineMenuItem> headerMenuItems = new ArrayList<>();
    headerMenuItems.add(new InlineMenuItem(createStringResource("TreeTablePanel.menu.createManager"), false, new HeaderMenuAction(this) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            OrgMemberPanel.this.createFocusMemberPerformed(SchemaConstants.ORG_MANAGER, target);
        }
    }));
    headerMenuItems.add(new InlineMenuItem());
    headerMenuItems.add(new InlineMenuItem(createStringResource("TreeTablePanel.menu.addManagers"), false, new HeaderMenuAction(this) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            OrgMemberPanel.this.addMembers(SchemaConstants.ORG_MANAGER, target);
        }
    }));
    headerMenuItems.add(new InlineMenuItem());
    headerMenuItems.add(new InlineMenuItem(createStringResource("TreeTablePanel.menu.removeManagersAll"), false, new HeaderMenuAction(this) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            removeManagersPerformed(QueryScope.ALL, target);
        }
    }));
    headerMenuItems.add(new InlineMenuItem(createStringResource("TreeTablePanel.menu.recomputeManagersAll"), false, new HeaderMenuAction(this) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            recomputeManagersPerformed(QueryScope.ALL, target);
        }
    }));
    headerMenuItems.add(new InlineMenuItem(createStringResource("TreeTablePanel.menu.deleteManagersAll"), false, new HeaderMenuAction(this) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            OrgMemberPanel.this.deleteMemberPerformed(QueryScope.ALL, SchemaConstants.ORG_MANAGER, target, "TreeTablePanel.menu.deleteManagersAll.confirm");
        }
    }));
    return headerMenuItems;
}
Also used : HeaderMenuAction(com.evolveum.midpoint.web.page.admin.configuration.component.HeaderMenuAction) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) ArrayList(java.util.ArrayList) InlineMenuItem(com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem)

Example 2 with HeaderMenuAction

use of com.evolveum.midpoint.web.page.admin.configuration.component.HeaderMenuAction in project midpoint by Evolveum.

the class OrgMemberPanel method createMembersHeaderInlineMenu.

@Override
protected List<InlineMenuItem> createMembersHeaderInlineMenu() {
    List<InlineMenuItem> headerMenuItems = super.createMembersHeaderInlineMenu();
    headerMenuItems.add(new InlineMenuItem(createStringResource("TreeTablePanel.menu.deleteMember"), false, new HeaderMenuAction(this) {

        @Override
        public void onClick(AjaxRequestTarget target) {
            deleteMemberPerformed(QueryScope.SELECTED, null, target, "TreeTablePanel.menu.deleteMember.confirm");
        }
    }));
    headerMenuItems.add(new InlineMenuItem(createStringResource("TreeTablePanel.menu.deleteAllMembers"), false, new HeaderMenuAction(this) {

        @Override
        public void onClick(AjaxRequestTarget target) {
            deleteMemberPerformed(QueryScope.ALL, null, target, "TreeTablePanel.menu.deleteAllMembers.confirm");
        }
    }));
    return headerMenuItems;
}
Also used : HeaderMenuAction(com.evolveum.midpoint.web.page.admin.configuration.component.HeaderMenuAction) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) InlineMenuItem(com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem)

Example 3 with HeaderMenuAction

use of com.evolveum.midpoint.web.page.admin.configuration.component.HeaderMenuAction in project midpoint by Evolveum.

the class AbstractRoleMemberPanel method createNewMemberInlineMenuItems.

protected List<InlineMenuItem> createNewMemberInlineMenuItems() {
    List<InlineMenuItem> newMemberMenuItems = new ArrayList<>();
    newMemberMenuItems.add(new InlineMenuItem(createStringResource("TreeTablePanel.menu.createMember"), false, new HeaderMenuAction(this) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            createFocusMemberPerformed(null, target);
        }
    }));
    newMemberMenuItems.add(new InlineMenuItem(createStringResource("TreeTablePanel.menu.addMembers"), false, new HeaderMenuAction(this) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            addMembers(null, target);
        }
    }));
    return newMemberMenuItems;
}
Also used : HeaderMenuAction(com.evolveum.midpoint.web.page.admin.configuration.component.HeaderMenuAction) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) ArrayList(java.util.ArrayList) InlineMenuItem(com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem)

Example 4 with HeaderMenuAction

use of com.evolveum.midpoint.web.page.admin.configuration.component.HeaderMenuAction in project midpoint by Evolveum.

the class ResourceContentPanel method createHeaderMenuItems.

private List<InlineMenuItem> createHeaderMenuItems() {
    List<InlineMenuItem> items = new ArrayList<InlineMenuItem>();
    items.add(new InlineMenuItem(createStringResource("pageContentAccounts.menu.enableAccounts"), true, new HeaderMenuAction(this) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onSubmit(AjaxRequestTarget target, Form<?> form) {
            updateResourceObjectStatusPerformed(null, target, true);
        }
    }));
    items.add(new InlineMenuItem(createStringResource("pageContentAccounts.menu.disableAccounts"), true, new HeaderMenuAction(this) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onSubmit(AjaxRequestTarget target, Form<?> form) {
            updateResourceObjectStatusPerformed(null, target, false);
        }
    }));
    items.add(new InlineMenuItem(createStringResource("pageContentAccounts.menu.deleteAccounts"), true, new HeaderMenuAction(this) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onSubmit(AjaxRequestTarget target, Form<?> form) {
            deleteResourceObjectPerformed(null, target);
        }
    }));
    items.add(new InlineMenuItem());
    items.add(new InlineMenuItem(createStringResource("pageContentAccounts.menu.importAccounts"), true, new HeaderMenuAction(this) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onSubmit(AjaxRequestTarget target, Form<?> form) {
            importResourceObject(null, target);
        }
    }));
    items.add(new InlineMenuItem());
    items.add(new InlineMenuItem(createStringResource("pageContentAccounts.menu.removeOwners"), true, new HeaderMenuAction(this) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onSubmit(AjaxRequestTarget target, Form<?> form) {
            changeOwner(null, target, null, Operation.REMOVE);
        }
    }));
    return items;
}
Also used : HeaderMenuAction(com.evolveum.midpoint.web.page.admin.configuration.component.HeaderMenuAction) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) Form(org.apache.wicket.markup.html.form.Form) ArrayList(java.util.ArrayList) InlineMenuItem(com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem)

Example 5 with HeaderMenuAction

use of com.evolveum.midpoint.web.page.admin.configuration.component.HeaderMenuAction in project midpoint by Evolveum.

the class PageConnectorHosts method initInlineHostsMenu.

private List<InlineMenuItem> initInlineHostsMenu() {
    List<InlineMenuItem> headerMenuItems = new ArrayList<>();
    headerMenuItems.add(new InlineMenuItem(createStringResource("PageBase.button.delete"), new HeaderMenuAction(this) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            deleteHostPerformed(target);
        }
    }));
    headerMenuItems.add(new InlineMenuItem(createStringResource("pageResources.button.discoveryRemote"), new HeaderMenuAction(this) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            discoveryRemotePerformed(target);
        }
    }));
    return headerMenuItems;
}
Also used : HeaderMenuAction(com.evolveum.midpoint.web.page.admin.configuration.component.HeaderMenuAction) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) ArrayList(java.util.ArrayList) InlineMenuItem(com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem)

Aggregations

InlineMenuItem (com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem)11 HeaderMenuAction (com.evolveum.midpoint.web.page.admin.configuration.component.HeaderMenuAction)11 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)11 ArrayList (java.util.ArrayList)9 Form (org.apache.wicket.markup.html.form.Form)3 LoadableModel (com.evolveum.midpoint.gui.api.model.LoadableModel)1 DebugSearchDto (com.evolveum.midpoint.web.page.admin.configuration.dto.DebugSearchDto)1 AbstractReadOnlyModel (org.apache.wicket.model.AbstractReadOnlyModel)1 IModel (org.apache.wicket.model.IModel)1 Model (org.apache.wicket.model.Model)1 PropertyModel (org.apache.wicket.model.PropertyModel)1