Search in sources :

Example 11 with AbstractTab

use of org.apache.wicket.extensions.markup.html.tabs.AbstractTab in project midpoint by Evolveum.

the class PageSystemConfiguration method getTabs.

// @Override
// protected void initializeModel(final PrismObject<SystemConfigurationType> configToEdit, boolean isNewObject, boolean isReadonly) {
// Task task = createSimpleTask(OPERATION_LOAD_SYSTEM_CONFIG);
// OperationResult result = new OperationResult(OPERATION_LOAD_SYSTEM_CONFIG);
// //        super.initializeModel(WebModelServiceUtils.loadSystemConfigurationAsPrismObject(this, task, result), false, isReadonly);
// }
private List<ITab> getTabs() {
    List<ITab> tabs = new ArrayList<>();
    tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.system.title")) {

        private static final long serialVersionUID = 1L;

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

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            PrismContainerWrapperModel<SystemConfigurationType, ObjectPolicyConfigurationType> model = createModel(getObjectModel(), SystemConfigurationType.F_DEFAULT_OBJECT_POLICY_CONFIGURATION);
            return new ObjectPolicyConfigurationTabPanel(panelId, model);
        }
    });
    tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.globalPolicyRule.title")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            PrismContainerWrapperModel<SystemConfigurationType, GlobalPolicyRuleType> model = createModel(getObjectModel(), SystemConfigurationType.F_GLOBAL_POLICY_RULE);
            return new GlobalPolicyRuleTabPanel<>(panelId, model);
        }
    });
    tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.globalAccountSynchronization.title")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return createContainerPanel(panelId, getObjectModel(), SystemConfigurationType.F_GLOBAL_ACCOUNT_SYNCHRONIZATION_SETTINGS, ProjectionPolicyType.COMPLEX_TYPE);
        }
    });
    tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.cleanupPolicy.title")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return createContainerPanel(panelId, getObjectModel(), SystemConfigurationType.F_CLEANUP_POLICY, CleanupPoliciesType.COMPLEX_TYPE);
        }
    });
    tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.notifications.title")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            PrismContainerWrapperModel<SystemConfigurationType, NotificationConfigurationType> model = createModel(getObjectModel(), SystemConfigurationType.F_NOTIFICATION_CONFIGURATION);
            return new NotificationConfigTabPanel(panelId, model);
        }
    });
    tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.logging.title")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            PrismContainerWrapperModel<SystemConfigurationType, LoggingConfigurationType> model = createModel(getObjectModel(), SystemConfigurationType.F_LOGGING);
            return new LoggingConfigurationTabPanel(panelId, model);
        }
    });
    tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.profiling.title")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            PrismContainerWrapperModel<SystemConfigurationType, ProfilingConfigurationType> profilingModel = createModel(getObjectModel(), SystemConfigurationType.F_PROFILING_CONFIGURATION);
            PrismContainerWrapperModel<SystemConfigurationType, LoggingConfigurationType> loggingModel = createModel(getObjectModel(), SystemConfigurationType.F_LOGGING);
            return new ProfilingConfigurationTabPanel(panelId, profilingModel, loggingModel);
        }
    });
    tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.adminGui.title")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return createContainerPanel(panelId, getObjectModel(), SystemConfigurationType.F_ADMIN_GUI_CONFIGURATION, AdminGuiConfigurationType.COMPLEX_TYPE);
        }
    });
    tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.workflow.title")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return createContainerPanel(panelId, getObjectModel(), SystemConfigurationType.F_WORKFLOW_CONFIGURATION, WfConfigurationType.COMPLEX_TYPE);
        }
    });
    tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.roleManagement.title")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return createContainerPanel(panelId, getObjectModel(), SystemConfigurationType.F_ROLE_MANAGEMENT, RoleManagementConfigurationType.COMPLEX_TYPE);
        }
    });
    tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.internals.title")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return createContainerPanel(panelId, getObjectModel(), SystemConfigurationType.F_INTERNALS, InternalsConfigurationType.COMPLEX_TYPE);
        }
    });
    tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.deploymentInformation.title")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return createContainerPanel(panelId, getObjectModel(), SystemConfigurationType.F_DEPLOYMENT_INFORMATION, DeploymentInformationType.COMPLEX_TYPE);
        }
    });
    tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.accessCertification.title")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return createContainerPanel(panelId, getObjectModel(), SystemConfigurationType.F_ACCESS_CERTIFICATION, AccessCertificationConfigurationType.COMPLEX_TYPE);
        }
    });
    tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.infrastructure.title")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return createContainerPanel(panelId, getObjectModel(), SystemConfigurationType.F_INFRASTRUCTURE, InfrastructureConfigurationType.COMPLEX_TYPE);
        }
    });
    tabs.add(new AbstractTab(createStringResource("pageSystemConfiguration.fullTextSearch.title")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return createContainerPanel(panelId, getObjectModel(), SystemConfigurationType.F_FULL_TEXT_SEARCH, FullTextSearchConfigurationType.COMPLEX_TYPE);
        }
    });
    return tabs;
}
Also used : ObjectPolicyConfigurationTabPanel(com.evolveum.midpoint.gui.impl.page.admin.configuration.component.ObjectPolicyConfigurationTabPanel) ArrayList(java.util.ArrayList) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) LoggingConfigurationTabPanel(com.evolveum.midpoint.gui.impl.page.admin.configuration.component.LoggingConfigurationTabPanel) NotificationConfigTabPanel(com.evolveum.midpoint.gui.impl.page.admin.configuration.component.NotificationConfigTabPanel) ProfilingConfigurationTabPanel(com.evolveum.midpoint.gui.impl.page.admin.configuration.component.ProfilingConfigurationTabPanel) SystemConfigPanel(com.evolveum.midpoint.gui.impl.page.admin.configuration.component.SystemConfigPanel) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab) PrismContainerWrapperModel(com.evolveum.midpoint.web.model.PrismContainerWrapperModel)

Example 12 with AbstractTab

use of org.apache.wicket.extensions.markup.html.tabs.AbstractTab in project midpoint by Evolveum.

the class ConfigurationStep method updateConfigurationTabs.

private void updateConfigurationTabs() {
    final com.evolveum.midpoint.web.component.form.Form form = getForm();
    TabbedPanel<ITab> tabbedPanel = getConfigurationTabbedPanel();
    List<ITab> tabs = tabbedPanel.getTabs().getObject();
    tabs.clear();
    List<ContainerWrapper> wrappers = configurationPropertiesModel.getObject();
    for (final ContainerWrapper wrapper : wrappers) {
        String tabName = getString(wrapper.getDisplayName(), null, wrapper.getDisplayName());
        tabs.add(new AbstractTab(new Model<>(tabName)) {

            @Override
            public WebMarkupContainer getPanel(String panelId) {
                return new PrismContainerPanel(panelId, new Model<>(wrapper), true, form, parentPage);
            }
        });
    }
    int i = tabbedPanel.getSelectedTab();
    if (i < 0 || i > tabs.size()) {
        i = 0;
    }
    tabbedPanel.setSelectedTab(i);
}
Also used : ContainerWrapper(com.evolveum.midpoint.web.component.prism.ContainerWrapper) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) ListModel(org.apache.wicket.model.util.ListModel) Model(org.apache.wicket.model.Model) NonEmptyLoadableModel(com.evolveum.midpoint.gui.api.model.NonEmptyLoadableModel) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab) PrismContainerPanel(com.evolveum.midpoint.web.component.prism.PrismContainerPanel)

Example 13 with AbstractTab

use of org.apache.wicket.extensions.markup.html.tabs.AbstractTab 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)

Example 14 with AbstractTab

use of org.apache.wicket.extensions.markup.html.tabs.AbstractTab in project midpoint by Evolveum.

the class TaskMainPanel method createTabs.

protected List<ITab> createTabs() {
    List<ITab> tabs = new ArrayList<>();
    final TaskTabsVisibility visibility = new TaskTabsVisibility();
    tabs.add(new AbstractTab(parentPage.createStringResource("pageTaskEdit.basic")) {

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return new TaskBasicTabPanel(panelId, getMainForm(), objectModel, taskDtoModel, parentPage);
        }

        @Override
        public boolean isVisible() {
            return visibility.computeBasicVisible(parentPage);
        }
    });
    tabs.add(new AbstractTab(parentPage.createStringResource("pageTaskEdit.scheduleTitle")) {

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return new TaskSchedulingTabPanel(panelId, getMainForm(), objectModel, taskDtoModel, parentPage);
        }

        @Override
        public boolean isVisible() {
            return visibility.computeSchedulingVisible(parentPage);
        }
    });
    tabs.add(new AbstractTab(parentPage.createStringResource("pageTaskEdit.subtasksAndThreads")) {

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return new TaskSubtasksAndThreadsTabPanel(panelId, getMainForm(), objectModel, taskDtoModel, parentPage);
        }

        @Override
        public boolean isVisible() {
            return visibility.computeSubtasksAndThreadsVisible(parentPage);
        }
    });
    tabs.add(new AbstractTab(parentPage.createStringResource("pageTaskEdit.progress")) {

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return new TaskProgressTabPanel(panelId, getMainForm(), objectModel, taskDtoModel, parentPage);
        }

        @Override
        public boolean isVisible() {
            return visibility.computeProgressVisible(parentPage);
        }
    });
    tabs.add(new AbstractTab(parentPage.createStringResource("pageTaskEdit.performance")) {

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return new TaskPerformanceTabPanel(panelId, getMainForm(), objectModel, taskDtoModel, parentPage);
        }

        @Override
        public boolean isVisible() {
            return visibility.computeEnvironmentalPerformanceVisible(parentPage);
        }
    });
    tabs.add(new AbstractTab(parentPage.createStringResource("pageTaskEdit.approvals")) {

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return new TaskApprovalsTabPanel(panelId, getMainForm(), objectModel, taskDtoModel, parentPage);
        }

        @Override
        public boolean isVisible() {
            return visibility.computeApprovalsVisible(parentPage);
        }
    });
    tabs.add(new AbstractTab(parentPage.createStringResource("pageTaskEdit.operation")) {

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return new TaskOperationTabPanel(panelId, getMainForm(), objectModel, taskDtoModel, parentPage);
        }

        @Override
        public boolean isVisible() {
            return visibility.computeOperationVisible(parentPage);
        }
    });
    tabs.add(new AbstractTab(parentPage.createStringResource("pageTaskEdit.result")) {

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return new TaskResultTabPanel(panelId, getMainForm(), objectModel, taskDtoModel, parentPage);
        }

        @Override
        public boolean isVisible() {
            return visibility.computeResultVisible(parentPage);
        }
    });
    tabs.add(new AbstractTab(parentPage.createStringResource("pageTaskEdit.errors")) {

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return new TaskErrorsTabPanel(panelId, getMainForm(), objectModel, taskDtoModel, parentPage);
        }

        @Override
        public boolean isVisible() {
            return visibility.computeErrorsVisible(parentPage);
        }
    });
    return tabs;
}
Also used : ArrayList(java.util.ArrayList) 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 15 with AbstractTab

use of org.apache.wicket.extensions.markup.html.tabs.AbstractTab in project hale by halestudio.

the class StatusPage method addControls.

@Override
protected void addControls(boolean loggedIn) {
    super.addControls(loggedIn);
    List<AbstractTab> tabs = new ArrayList<AbstractTab>();
    tabs.add(new AbstractTab(Model.of("Memory")) {

        private static final long serialVersionUID = -8792707190741096316L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return new MemoryPanel(panelId);
        }
    });
    tabs.add(new AbstractTab(Model.of("Jobs")) {

        private static final long serialVersionUID = -8792707190741096316L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return new JobPanelWrapper(panelId);
        }
    });
    add(new TabbedPanel<AbstractTab>("tabs", tabs));
}
Also used : JobPanelWrapper(eu.esdihumboldt.hale.server.status.war.components.JobPanelWrapper) ArrayList(java.util.ArrayList) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab) MemoryPanel(eu.esdihumboldt.hale.server.status.war.components.memory.MemoryPanel) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer)

Aggregations

AbstractTab (org.apache.wicket.extensions.markup.html.tabs.AbstractTab)29 ArrayList (java.util.ArrayList)26 ITab (org.apache.wicket.extensions.markup.html.tabs.ITab)26 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)16 Panel (org.apache.wicket.markup.html.panel.Panel)14 AjaxBootstrapTabbedPanel (de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel)11 ResourceModel (org.apache.wicket.model.ResourceModel)9 Model (org.apache.wicket.model.Model)7 TabbedPanel (com.evolveum.midpoint.web.component.TabbedPanel)5 List (java.util.List)4 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)4 WizardMgtPanel (org.apache.syncope.client.console.wizards.WizardMgtPanel)3 LoadableModel (com.evolveum.midpoint.gui.api.model.LoadableModel)2 NonEmptyLoadableModel (com.evolveum.midpoint.gui.api.model.NonEmptyLoadableModel)2 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)2 ChangePasswordPanel (com.evolveum.midpoint.web.page.self.component.ChangePasswordPanel)2 ConnectorConfigurationType (com.evolveum.midpoint.xml.ns._public.common.common_3.ConnectorConfigurationType)2 DirectoryPanel (org.apache.syncope.client.console.panels.DirectoryPanel)2 ActionsPanel (org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel)2 Fragment (org.apache.wicket.markup.html.panel.Fragment)2