Search in sources :

Example 1 with MergeObjectsPanel

use of com.evolveum.midpoint.web.page.admin.users.component.MergeObjectsPanel in project midpoint by Evolveum.

the class PageMergeObjects method createMainPanel.

@Override
protected AbstractObjectMainPanel<UserType> createMainPanel(String id) {
    // empty assignments model
    CountableLoadableModel<AssignmentType> assignments = new CountableLoadableModel<>() {

        private static final long serialVersionUID = 1L;

        @Override
        protected List<AssignmentType> load() {
            return new ArrayList<>();
        }
    };
    // empty policy rules  model
    CountableLoadableModel<AssignmentType> policyRules = new CountableLoadableModel<>() {

        private static final long serialVersionUID = 1L;

        @Override
        protected List<AssignmentType> load() {
            return new ArrayList<>();
        }
    };
    // empty projections model
    LoadableModel<List<ShadowWrapper>> shadows = new LoadableModel<>() {

        private static final long serialVersionUID = 1L;

        @Override
        protected List<ShadowWrapper> load() {
            return new ArrayList<>();
        }
    };
    return new FocusMainPanel<UserType>(id, getObjectModel(), shadows, this) {

        private static final long serialVersionUID = 1L;

        @Override
        protected List<ITab> createTabs(final PageAdminObjectDetails<UserType> parentPage) {
            List<ITab> tabs = new ArrayList<>();
            tabs.add(new PanelTab(parentPage.createStringResource("PageMergeObjects.tabTitle"), new VisibleEnableBehaviour()) {

                private static final long serialVersionUID = 1L;

                @Override
                public WebMarkupContainer createPanel(String panelId) {
                    mergeObjectsPanel = new MergeObjectsPanel<>(panelId, mergeObjectModel, mergeWithObjectModel, type, PageMergeObjects.this);
                    return mergeObjectsPanel;
                }
            });
            return tabs;
        }

        @Override
        protected boolean isPreviewButtonVisible() {
            return false;
        }

        @Override
        protected boolean getOptionsPanelVisibility() {
            return false;
        }
    };
}
Also used : PanelTab(com.evolveum.midpoint.gui.api.component.tabs.PanelTab) MergeObjectsPanel(com.evolveum.midpoint.web.page.admin.users.component.MergeObjectsPanel) ArrayList(java.util.ArrayList) PageAdminObjectDetails(com.evolveum.midpoint.web.page.admin.PageAdminObjectDetails) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) CountableLoadableModel(com.evolveum.midpoint.gui.api.model.CountableLoadableModel) AssignmentType(com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType) CountableLoadableModel(com.evolveum.midpoint.gui.api.model.CountableLoadableModel) LoadableModel(com.evolveum.midpoint.gui.api.model.LoadableModel) FocusMainPanel(com.evolveum.midpoint.web.component.objectdetails.FocusMainPanel) ArrayList(java.util.ArrayList) List(java.util.List) ShadowWrapper(com.evolveum.midpoint.gui.api.prism.wrapper.ShadowWrapper) VisibleEnableBehaviour(com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)

Aggregations

PanelTab (com.evolveum.midpoint.gui.api.component.tabs.PanelTab)1 CountableLoadableModel (com.evolveum.midpoint.gui.api.model.CountableLoadableModel)1 LoadableModel (com.evolveum.midpoint.gui.api.model.LoadableModel)1 ShadowWrapper (com.evolveum.midpoint.gui.api.prism.wrapper.ShadowWrapper)1 FocusMainPanel (com.evolveum.midpoint.web.component.objectdetails.FocusMainPanel)1 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)1 PageAdminObjectDetails (com.evolveum.midpoint.web.page.admin.PageAdminObjectDetails)1 MergeObjectsPanel (com.evolveum.midpoint.web.page.admin.users.component.MergeObjectsPanel)1 AssignmentType (com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 ITab (org.apache.wicket.extensions.markup.html.tabs.ITab)1 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)1