Search in sources :

Example 1 with ChooseMemberPopup

use of com.evolveum.midpoint.gui.api.component.ChooseMemberPopup in project midpoint by Evolveum.

the class AbstractRoleMemberPanel method createAssignButton.

private AjaxIconButton createAssignButton(String buttonId) {
    AjaxIconButton assignButton = new AjaxIconButton(buttonId, new Model<>(GuiStyleConstants.EVO_ASSIGNMENT_ICON), createStringResource("TreeTablePanel.menu.addMembers")) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            ChooseMemberPopup browser = new ChooseMemberPopup(AbstractRoleMemberPanel.this.getPageBase().getMainPopupBodyId(), getSearchBoxConfiguration().getDefaultRelationConfiguration(), loadMultiFunctionalButtonModel(false)) {

                private static final long serialVersionUID = 1L;

                @Override
                protected R getAssignmentTargetRefObject() {
                    return AbstractRoleMemberPanel.this.getModelObject();
                }

                @Override
                protected List<QName> getAvailableObjectTypes() {
                    return null;
                }

                @Override
                protected List<ObjectReferenceType> getArchetypeRefList() {
                    // todo
                    return new ArrayList<>();
                }

                @Override
                protected boolean isOrgTreeVisible() {
                    return true;
                }
            };
            browser.setOutputMarkupId(true);
            AbstractRoleMemberPanel.this.getPageBase().showMainPopup(browser, target);
        }
    };
    assignButton.add(AttributeAppender.append("class", "btn btn-default btn-sm"));
    return assignButton;
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) ChooseMemberPopup(com.evolveum.midpoint.gui.api.component.ChooseMemberPopup) QName(javax.xml.namespace.QName) AjaxIconButton(com.evolveum.midpoint.web.component.AjaxIconButton)

Example 2 with ChooseMemberPopup

use of com.evolveum.midpoint.gui.api.component.ChooseMemberPopup in project midpoint by Evolveum.

the class AbstractRoleMemberPanel method createAssignButton.

private AjaxIconButton createAssignButton(String buttonId) {
    AjaxIconButton assignButton = new AjaxIconButton(buttonId, new Model<>(GuiStyleConstants.EVO_ASSIGNMENT_ICON), createStringResource("TreeTablePanel.menu.addMembers")) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            ChooseMemberPopup browser = new ChooseMemberPopup(AbstractRoleMemberPanel.this.getPageBase().getMainPopupBodyId(), getSearchBoxConfiguration().getDefaultRelationConfiguration(), loadMultiFunctionalButtonModel(false)) {

                private static final long serialVersionUID = 1L;

                @Override
                protected R getAssignmentTargetRefObject() {
                    return AbstractRoleMemberPanel.this.getModelObject();
                }

                @Override
                protected List<QName> getAvailableObjectTypes() {
                    return null;
                }

                @Override
                protected List<ObjectReferenceType> getArchetypeRefList() {
                    // todo
                    return new ArrayList<>();
                }

                @Override
                protected boolean isOrgTreeVisible() {
                    return true;
                }
            };
            browser.setOutputMarkupId(true);
            AbstractRoleMemberPanel.this.getPageBase().showMainPopup(browser, target);
        }
    };
    assignButton.add(AttributeAppender.append("class", "btn btn-default btn-sm"));
    return assignButton;
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) ChooseMemberPopup(com.evolveum.midpoint.gui.api.component.ChooseMemberPopup) QName(javax.xml.namespace.QName) AjaxIconButton(com.evolveum.midpoint.web.component.AjaxIconButton)

Aggregations

ChooseMemberPopup (com.evolveum.midpoint.gui.api.component.ChooseMemberPopup)2 AjaxIconButton (com.evolveum.midpoint.web.component.AjaxIconButton)2 QName (javax.xml.namespace.QName)2 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)2