Search in sources :

Example 1 with AbstractTab

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

the class SchemaStep method createSchemaEditor.

private ITab createSchemaEditor() {
    return new AbstractTab(createStringModel("SchemaStep.xml")) {

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            XmlEditorPanel xmlEditorPanel = new XmlEditorPanel(panelId, createXmlEditorModel());
            // quick fix: now changes from XmlEditorPanel are not saved anyhow
            //(e.g. by clicking Finish button in wizard). For now,
            //panel is made disabled for editing
            AceEditor aceEditor = (AceEditor) xmlEditorPanel.get(ID_ACE_EDITOR);
            aceEditor.setReadonly(true);
            return xmlEditorPanel;
        }
    };
}
Also used : XmlEditorPanel(com.evolveum.midpoint.web.component.wizard.resource.component.XmlEditorPanel) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab) AceEditor(com.evolveum.midpoint.web.component.AceEditor)

Example 2 with AbstractTab

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

the class PageAbstractSelfCredentials method initLayout.

private void initLayout() {
    Form<?> mainForm = new Form<>(ID_MAIN_FORM);
    List<ITab> tabs = new ArrayList<>();
    tabs.add(new AbstractTab(createStringResource("PageSelfCredentials.tabs.password")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return new ChangePasswordPanel(panelId, isCheckOldPassword(), model, model.getObject());
        }
    });
    TabbedPanel<ITab> credentialsTabPanel = WebComponentUtil.createTabPanel(ID_TAB_PANEL, this, tabs, null);
    credentialsTabPanel.setOutputMarkupId(true);
    mainForm.add(credentialsTabPanel);
    initButtons(mainForm);
    add(mainForm);
}
Also used : Form(org.apache.wicket.markup.html.form.Form) ChangePasswordPanel(com.evolveum.midpoint.web.page.self.component.ChangePasswordPanel) ArrayList(java.util.ArrayList) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer)

Example 3 with AbstractTab

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

the class CamelRoutes method buildTabList.

private List<ITab> buildTabList() {
    List<ITab> tabs = new ArrayList<>(3);
    tabs.add(new AbstractTab(new Model<>(AnyTypeKind.USER.name())) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            CamelRoutesDirectoryPanel panel = new CamelRoutesDirectoryPanel(panelId, getPageReference(), AnyTypeKind.USER);
            panel.setEnabled(restClient.isCamelEnabledFor(AnyTypeKind.USER));
            return panel;
        }
    });
    tabs.add(new AbstractTab(new Model<>(AnyTypeKind.GROUP.name())) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            CamelRoutesDirectoryPanel panel = new CamelRoutesDirectoryPanel(panelId, getPageReference(), AnyTypeKind.GROUP);
            panel.setEnabled(restClient.isCamelEnabledFor(AnyTypeKind.GROUP));
            return panel;
        }
    });
    tabs.add(new AbstractTab(new Model<>(AnyTypeKind.ANY_OBJECT.name())) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            CamelRoutesDirectoryPanel panel = new CamelRoutesDirectoryPanel(panelId, getPageReference(), AnyTypeKind.ANY_OBJECT);
            panel.setEnabled(restClient.isCamelEnabledFor(AnyTypeKind.ANY_OBJECT));
            return panel;
        }
    });
    return tabs;
}
Also used : CamelRoutesDirectoryPanel(org.apache.syncope.client.console.panels.CamelRoutesDirectoryPanel) AjaxBootstrapTabbedPanel(de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel) Panel(org.apache.wicket.markup.html.panel.Panel) ArrayList(java.util.ArrayList) Model(org.apache.wicket.model.Model) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab) CamelRoutesDirectoryPanel(org.apache.syncope.client.console.panels.CamelRoutesDirectoryPanel) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab)

Example 4 with AbstractTab

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

the class Policies method buildTabList.

private List<ITab> buildTabList() {
    final List<ITab> tabs = new ArrayList<>();
    tabs.add(new AbstractTab(new ResourceModel("policy.account")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new AccountPolicyDirectoryPanel(panelId, getPageReference());
        }
    });
    tabs.add(new AbstractTab(new ResourceModel("policy.password")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new PasswordPolicyDirectoryPanel(panelId, getPageReference());
        }
    });
    tabs.add(new AbstractTab(new ResourceModel("policy.pull")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new PullPolicyDirectoryPanel(panelId, getPageReference());
        }
    });
    return tabs;
}
Also used : AccountPolicyDirectoryPanel(org.apache.syncope.client.console.policies.AccountPolicyDirectoryPanel) PasswordPolicyDirectoryPanel(org.apache.syncope.client.console.policies.PasswordPolicyDirectoryPanel) AjaxBootstrapTabbedPanel(de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel) Panel(org.apache.wicket.markup.html.panel.Panel) PullPolicyDirectoryPanel(org.apache.syncope.client.console.policies.PullPolicyDirectoryPanel) AccountPolicyDirectoryPanel(org.apache.syncope.client.console.policies.AccountPolicyDirectoryPanel) ArrayList(java.util.ArrayList) PasswordPolicyDirectoryPanel(org.apache.syncope.client.console.policies.PasswordPolicyDirectoryPanel) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab) ResourceModel(org.apache.wicket.model.ResourceModel) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab) PullPolicyDirectoryPanel(org.apache.syncope.client.console.policies.PullPolicyDirectoryPanel)

Example 5 with AbstractTab

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

the class Security method buildTabList.

private List<ITab> buildTabList() {
    final List<ITab> tabs = new ArrayList<>();
    tabs.add(new AbstractTab(new ResourceModel("roles")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new RoleDirectoryPanel.Builder(getPageReference()) {

                private static final long serialVersionUID = -5960765294082359003L;
            }.addNewItemPanelBuilder(new RoleWizardBuilder(new RoleTO(), getPageReference()), true).build(panelId);
        }
    });
    tabs.add(new AbstractTab(new ResourceModel("dynRealms")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new DynRealmDirectoryPanel.Builder(getPageReference()) {

                private static final long serialVersionUID = -5960765294082359003L;
            }.build(panelId);
        }
    });
    tabs.add(new AbstractTab(new ResourceModel("applications")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new ApplicationDirectoryPanel.Builder(getPageReference()) {

                private static final long serialVersionUID = -5960765294082359003L;
            }.build(panelId);
        }
    });
    tabs.add(new AbstractTab(new ResourceModel("securityQuestions")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new SecurityQuestionsPanel(panelId, getPageReference());
        }
    });
    return tabs;
}
Also used : RoleWizardBuilder(org.apache.syncope.client.console.wizards.role.RoleWizardBuilder) SecurityQuestionsPanel(org.apache.syncope.client.console.panels.SecurityQuestionsPanel) RoleWizardBuilder(org.apache.syncope.client.console.wizards.role.RoleWizardBuilder) BookmarkablePageLinkBuilder(org.apache.syncope.client.console.BookmarkablePageLinkBuilder) ArrayList(java.util.ArrayList) RoleTO(org.apache.syncope.common.lib.to.RoleTO) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab) SecurityQuestionsPanel(org.apache.syncope.client.console.panels.SecurityQuestionsPanel) DynRealmDirectoryPanel(org.apache.syncope.client.console.panels.DynRealmDirectoryPanel) AjaxBootstrapTabbedPanel(de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel) Panel(org.apache.wicket.markup.html.panel.Panel) RoleDirectoryPanel(org.apache.syncope.client.console.panels.RoleDirectoryPanel) ApplicationDirectoryPanel(org.apache.syncope.client.console.panels.ApplicationDirectoryPanel) RoleDirectoryPanel(org.apache.syncope.client.console.panels.RoleDirectoryPanel) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab) ResourceModel(org.apache.wicket.model.ResourceModel)

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