Search in sources :

Example 1 with TabbedPanel

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

the class AbstractObjectMainPanel method onConfigure.

@Override
protected void onConfigure() {
    super.onConfigure();
    TabbedPanel tabbedPanel = (TabbedPanel) get(ID_MAIN_FORM + ":" + ID_TAB_PANEL);
    WebComponentUtil.setSelectedTabFromPageParameters(tabbedPanel, getPage().getPageParameters(), PARAMETER_SELECTED_TAB);
}
Also used : TabbedPanel(com.evolveum.midpoint.web.component.TabbedPanel)

Example 2 with TabbedPanel

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

the class TaskMainPanel method initTabPanel.

protected void initTabPanel(Form mainForm) {
    List<ITab> tabs = createTabs();
    TabbedPanel<ITab> tabPanel = WebComponentUtil.createTabPanel(ID_TAB_PANEL, parentPage, tabs, new TabbedPanel.RightSideItemProvider() {

        @Override
        public Component createRightSideItem(String id) {
            VisibleEnableBehaviour boxEnabled = new VisibleEnableBehaviour() {

                @Override
                public boolean isEnabled() {
                    return !parentPage.isEdit();
                }
            };
            TaskShowAdvancedFeaturesPanel advancedFeaturesPanel = new TaskShowAdvancedFeaturesPanel(id, showAdvancedFeaturesModel, boxEnabled) {

                @Override
                protected void onAdvancedFeaturesUpdate(AjaxRequestTarget target) {
                    target.add(getTabPanel());
                    target.add(getButtonPanel());
                // we DO NOT call parentPage.refresh here because in edit mode this would erase any model changes
                // (well, because - for some strange reasons - even this code erases name and description input fields
                // occassionally, we hide 'advanced features' checkbox in editing mode)
                }
            };
            advancedFeaturesPanel.add(new VisibleEnableBehaviour() {

                @Override
                public boolean isVisible() {
                    // we don't distinguish between basic/advanced features for other task types yet
                    return parentPage.getTaskDto().isWorkflow();
                }
            });
            return advancedFeaturesPanel;
        }
    });
    mainForm.add(tabPanel);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) TabbedPanel(com.evolveum.midpoint.web.component.TabbedPanel) VisibleEnableBehaviour(com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour) Component(org.apache.wicket.Component) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab)

Example 3 with TabbedPanel

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

the class MultivalueContainerDetailsPanel method initLayout.

private void initLayout() {
    List<ITab> tabs = createTabs();
    if (isAddDefaultPanel) {
        tabs.add(0, addBasicContainerValuePanel());
    }
    TabbedPanel tabbedPanel = WebComponentUtil.createTabPanel(ID_DETAILS, getPageBase(), tabs, null);
    tabbedPanel.setOutputMarkupId(true);
    add(tabbedPanel);
    DisplayNamePanel<C> displayNamePanel = createDisplayNamePanel(ID_DISPLAY_NAME);
    displayNamePanel.setOutputMarkupId(true);
    add(displayNamePanel);
}
Also used : TabbedPanel(com.evolveum.midpoint.web.component.TabbedPanel) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab)

Example 4 with TabbedPanel

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

the class PageCertDefinition method initTabs.

private void initTabs(Form mainForm) {
    List<ITab> tabs = new ArrayList<>();
    tabs.add(new AbstractTab(createStringResource("PageCertDefinition.basic")) {

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return new DefinitionBasicPanel(panelId, definitionModel);
        }
    });
    tabs.add(new AbstractTab(createStringResource("PageCertDefinition.scopeDefinition")) {

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return new DefinitionScopePanel(panelId, new PropertyModel<>(definitionModel, CertDefinitionDto.F_SCOPE_DEFINITION));
        }
    });
    tabs.add(new CountablePanelTab(createStringResource("PageCertDefinition.stagesDefinition")) {

        @Override
        public WebMarkupContainer createPanel(String panelId) {
            return new DefinitionStagesPanel(panelId, new PropertyModel<>(definitionModel, CertDefinitionDto.F_STAGE_DEFINITION), PageCertDefinition.this);
        }

        @Override
        public String getCount() {
            return String.valueOf(definitionModel.getObject().getNumberOfStages());
        }
    });
    tabs.add(new AbstractTab(createStringResource("PageCertDefinition.xmlDefinition")) {

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return new DefinitionXmlPanel(panelId, definitionModel);
        }
    });
    TabbedPanel tabPanel = WebComponentUtil.createTabPanel(ID_TAB_PANEL, this, tabs, null);
    mainForm.add(tabPanel);
}
Also used : ArrayList(java.util.ArrayList) PropertyModel(org.apache.wicket.model.PropertyModel) CountablePanelTab(com.evolveum.midpoint.gui.api.component.tabs.CountablePanelTab) TabbedPanel(com.evolveum.midpoint.web.component.TabbedPanel) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab)

Example 5 with TabbedPanel

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

the class PageSystemConfiguration method initLayout.

private void initLayout() {
    Form mainForm = new Form(ID_MAIN_FORM, true);
    add(mainForm);
    List<ITab> tabs = new ArrayList<>();
    tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.system.title")) {

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            systemConfigPanel = new SystemConfigPanel(panelId, model);
            return systemConfigPanel;
        }
    });
    tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.notifications.title")) {

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            notificationConfigPanel = new NotificationConfigPanel(panelId, new PropertyModel<NotificationConfigurationDto>(model, "notificationConfig"));
            return notificationConfigPanel;
        }
    });
    tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.logging.title")) {

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            loggingConfigPanel = new LoggingConfigPanel(panelId, new PropertyModel<LoggingDto>(model, "loggingConfig"));
            return loggingConfigPanel;
        }
    });
    tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.profiling.title")) {

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            profilingConfigPanel = new ProfilingConfigPanel(panelId, new PropertyModel<ProfilingDto>(model, "profilingDto"), PageSystemConfiguration.this);
            return profilingConfigPanel;
        }
    });
    tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.adminGui.title")) {

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            adminGuiConfigPanel = new AdminGuiConfigPanel(panelId, model);
            return adminGuiConfigPanel;
        }
    });
    TabbedPanel tabPanel = new TabbedPanel(ID_TAB_PANEL, tabs) {

        @Override
        protected void onTabChange(int index) {
            PageParameters params = getPageParameters();
            params.set(SELECTED_TAB_INDEX, index);
        }
    };
    tabPanel.setOutputMarkupId(true);
    mainForm.add(tabPanel);
    initButtons(mainForm);
}
Also used : Form(com.evolveum.midpoint.web.component.form.Form) ArrayList(java.util.ArrayList) TabbedPanel(com.evolveum.midpoint.web.component.TabbedPanel) PageParameters(org.apache.wicket.request.mapper.parameter.PageParameters) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab)

Aggregations

TabbedPanel (com.evolveum.midpoint.web.component.TabbedPanel)12 ITab (org.apache.wicket.extensions.markup.html.tabs.ITab)11 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)6 ArrayList (java.util.ArrayList)5 AbstractTab (org.apache.wicket.extensions.markup.html.tabs.AbstractTab)5 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)4 CountablePanelTab (com.evolveum.midpoint.gui.api.component.tabs.CountablePanelTab)2 AjaxButton (com.evolveum.midpoint.web.component.AjaxButton)2 List (java.util.List)2 PageParameters (org.apache.wicket.request.mapper.parameter.PageParameters)2 BasePanel (com.evolveum.midpoint.gui.api.component.BasePanel)1 PanelTab (com.evolveum.midpoint.gui.api.component.tabs.PanelTab)1 LoadableModel (com.evolveum.midpoint.gui.api.model.LoadableModel)1 PageBase (com.evolveum.midpoint.gui.api.page.PageBase)1 PolyString (com.evolveum.midpoint.prism.polystring.PolyString)1 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)1 AjaxTabbedPanel (com.evolveum.midpoint.web.component.AjaxTabbedPanel)1 Form (com.evolveum.midpoint.web.component.form.Form)1 MidpointForm (com.evolveum.midpoint.web.component.form.MidpointForm)1 AbstractObjectMainPanel (com.evolveum.midpoint.web.component.objectdetails.AbstractObjectMainPanel)1