Search in sources :

Example 6 with PageParameters

use of org.apache.wicket.request.mapper.parameter.PageParameters in project midpoint by Evolveum.

the class PageReports method reportTypeFilterPerformed.

private void reportTypeFilterPerformed(AjaxRequestTarget target, String oid) {
    PageParameters params = new PageParameters();
    params.add(OnePageParameterEncoder.PARAMETER, oid);
    navigateToNext(PageCreatedReports.class, params);
}
Also used : PageParameters(org.apache.wicket.request.mapper.parameter.PageParameters)

Example 7 with PageParameters

use of org.apache.wicket.request.mapper.parameter.PageParameters in project midpoint by Evolveum.

the class PageReports method configurePerformed.

private void configurePerformed(AjaxRequestTarget target, ReportType report) {
    PageParameters params = new PageParameters();
    params.add(OnePageParameterEncoder.PARAMETER, report.getOid());
    navigateToNext(PageReport.class, params);
}
Also used : PageParameters(org.apache.wicket.request.mapper.parameter.PageParameters)

Example 8 with PageParameters

use of org.apache.wicket.request.mapper.parameter.PageParameters in project midpoint by Evolveum.

the class PageBase method createConfigurationItems.

private MainMenuItem createConfigurationItems() {
    MainMenuItem item = new MainMenuItem("fa fa-cog", createStringResource("PageAdmin.menu.top.configuration"), null);
    item.setInsertDefaultBackBreadcrumb(false);
    List<MenuItem> submenu = item.getItems();
    MenuItem menu = new MenuItem(createStringResource("PageAdmin.menu.top.configuration.bulkActions"), PageBulkAction.class);
    submenu.add(menu);
    menu = new MenuItem(createStringResource("PageAdmin.menu.top.configuration.importObject"), PageImportObject.class, null, null);
    submenu.add(menu);
    menu = new MenuItem(createStringResource("PageAdmin.menu.top.configuration.repositoryObjects"), PageDebugList.class);
    submenu.add(menu);
    menu = new MenuItem(createStringResource("PageAdmin.menu.top.configuration.repositoryObjectView"), PageDebugView.class, null, createVisibleDisabledBehaviorForEditMenu(PageDebugView.class));
    submenu.add(menu);
    PageParameters params = new PageParameters();
    params.add(PageSystemConfiguration.SELECTED_TAB_INDEX, PageSystemConfiguration.CONFIGURATION_TAB_BASIC);
    menu = new MenuItem(createStringResource("PageAdmin.menu.top.configuration.basic"), PageSystemConfiguration.class, params, null) {

        @Override
        public boolean isMenuActive(WebPage page) {
            if (!PageSystemConfiguration.class.equals(page.getClass())) {
                return false;
            }
            int index = getSelectedTabForConfiguration(page);
            return PageSystemConfiguration.CONFIGURATION_TAB_BASIC == index ? true : false;
        }
    };
    submenu.add(menu);
    params = new PageParameters();
    params.add(PageSystemConfiguration.SELECTED_TAB_INDEX, PageSystemConfiguration.CONFIGURATION_TAB_NOTIFICATION);
    menu = new MenuItem(createStringResource("PageAdmin.menu.top.configuration.notifications"), PageSystemConfiguration.class, params, null) {

        @Override
        public boolean isMenuActive(WebPage page) {
            if (!PageSystemConfiguration.class.equals(page.getClass())) {
                return false;
            }
            int index = getSelectedTabForConfiguration(page);
            return PageSystemConfiguration.CONFIGURATION_TAB_NOTIFICATION == index ? true : false;
        }
    };
    submenu.add(menu);
    params = new PageParameters();
    params.add(PageSystemConfiguration.SELECTED_TAB_INDEX, PageSystemConfiguration.CONFIGURATION_TAB_LOGGING);
    menu = new MenuItem(createStringResource("PageAdmin.menu.top.configuration.logging"), PageSystemConfiguration.class, params, null) {

        @Override
        public boolean isMenuActive(WebPage page) {
            if (!PageSystemConfiguration.class.equals(page.getClass())) {
                return false;
            }
            int index = getSelectedTabForConfiguration(page);
            return PageSystemConfiguration.CONFIGURATION_TAB_LOGGING == index ? true : false;
        }
    };
    submenu.add(menu);
    params = new PageParameters();
    params.add(PageSystemConfiguration.SELECTED_TAB_INDEX, PageSystemConfiguration.CONFIGURATION_TAB_PROFILING);
    menu = new MenuItem(createStringResource("PageAdmin.menu.top.configuration.profiling"), PageSystemConfiguration.class, params, null) {

        @Override
        public boolean isMenuActive(WebPage page) {
            if (!PageSystemConfiguration.class.equals(page.getClass())) {
                return false;
            }
            int index = getSelectedTabForConfiguration(page);
            return PageSystemConfiguration.CONFIGURATION_TAB_PROFILING == index ? true : false;
        }
    };
    submenu.add(menu);
    params = new PageParameters();
    params.add(PageSystemConfiguration.SELECTED_TAB_INDEX, PageSystemConfiguration.CONFIGURATION_TAB_ADMIN_GUI);
    menu = new MenuItem(createStringResource("PageAdmin.menu.top.configuration.adminGui"), PageSystemConfiguration.class, params, null) {

        @Override
        public boolean isMenuActive(WebPage page) {
            if (!PageSystemConfiguration.class.equals(page.getClass())) {
                return false;
            }
            int index = getSelectedTabForConfiguration(page);
            return PageSystemConfiguration.CONFIGURATION_TAB_ADMIN_GUI == index ? true : false;
        }
    };
    submenu.add(menu);
    menu = new MenuItem(createStringResource("PageAdmin.menu.top.configuration.shadowsDetails"), PageAccounts.class);
    submenu.add(menu);
    menu = new MenuItem(createStringResource("PageAdmin.menu.top.configuration.internals"), PageInternals.class);
    submenu.add(menu);
    menu = new MenuItem(createStringResource("PageAdmin.menu.top.configuration.repoQuery"), PageRepositoryQuery.class);
    submenu.add(menu);
    if (SystemConfigurationHolder.isExperimentalCodeEnabled()) {
        menu = new MenuItem(createStringResource("PageAdmin.menu.top.configuration.evaluateMapping"), PageEvaluateMapping.class);
        submenu.add(menu);
    }
    menu = new MenuItem(createStringResource("PageAdmin.menu.top.configuration.about"), PageAbout.class);
    submenu.add(menu);
    return item;
}
Also used : WebPage(org.apache.wicket.markup.html.WebPage) PageParameters(org.apache.wicket.request.mapper.parameter.PageParameters)

Example 9 with PageParameters

use of org.apache.wicket.request.mapper.parameter.PageParameters in project midpoint by Evolveum.

the class PageBase method updateBreadcrumbParameters.

public void updateBreadcrumbParameters(String key, Object value) {
    List<Breadcrumb> list = getBreadcrumbs();
    if (list.isEmpty()) {
        return;
    }
    Breadcrumb bc = list.get(list.size() - 1);
    PageParameters params = bc.getParameters();
    if (params == null) {
        return;
    }
    params.set(key, value);
}
Also used : Breadcrumb(com.evolveum.midpoint.web.component.breadcrumbs.Breadcrumb) PageParameters(org.apache.wicket.request.mapper.parameter.PageParameters)

Example 10 with PageParameters

use of org.apache.wicket.request.mapper.parameter.PageParameters in project midpoint by Evolveum.

the class PageBase method createCertificationItems.

private MainMenuItem createCertificationItems() {
    MainMenuItem item = new MainMenuItem("fa fa-certificate", createStringResource("PageAdmin.menu.top.certification"), null) {

        private static final long serialVersionUID = 1L;

        @Override
        public String getBubbleLabel() {
            Integer certWorkItemCount = certWorkItemCountModel.getObject();
            if (certWorkItemCount == null || certWorkItemCount == 0) {
                return null;
            } else {
                return certWorkItemCount.toString();
            }
        }
    };
    List<MenuItem> submenu = item.getItems();
    MenuItem menu = new MenuItem(createStringResource("PageAdmin.menu.top.certification.definitions"), PageCertDefinitions.class);
    submenu.add(menu);
    menu = new MenuItem(createStringResource("PageAdmin.menu.top.certification.newDefinition"), PageCertDefinition.class);
    submenu.add(menu);
    menu = new MenuItem(createStringResource("PageAdmin.menu.top.certification.campaigns"), PageCertCampaigns.class);
    submenu.add(menu);
    PageParameters params = new PageParameters();
    params.add(PageTasks.SELECTED_CATEGORY, TaskCategory.ACCESS_CERTIFICATION);
    menu = new MenuItem(createStringResource("PageAdmin.menu.top.certification.scheduling"), PageTasksCertScheduling.class, params, null);
    submenu.add(menu);
    menu = new MenuItem(createStringResource("PageAdmin.menu.top.certification.decisions"), PageCertDecisions.class);
    submenu.add(menu);
    return item;
}
Also used : PageCertDecisions(com.evolveum.midpoint.web.page.admin.certification.PageCertDecisions) PageTasksCertScheduling(com.evolveum.midpoint.web.page.admin.server.PageTasksCertScheduling) PageCertCampaigns(com.evolveum.midpoint.web.page.admin.certification.PageCertCampaigns) PageParameters(org.apache.wicket.request.mapper.parameter.PageParameters) PageCertDefinition(com.evolveum.midpoint.web.page.admin.certification.PageCertDefinition)

Aggregations

PageParameters (org.apache.wicket.request.mapper.parameter.PageParameters)52 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)7 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)7 ArrayList (java.util.ArrayList)5 StringValue (org.apache.wicket.util.string.StringValue)5 PageBase (com.evolveum.midpoint.gui.api.page.PageBase)4 UserType (com.evolveum.midpoint.xml.ns._public.common.common_3.UserType)4 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)4 ObjectQuery (com.evolveum.midpoint.prism.query.ObjectQuery)3 ObjectAlreadyExistsException (com.evolveum.midpoint.util.exception.ObjectAlreadyExistsException)3 ObjectNotFoundException (com.evolveum.midpoint.util.exception.ObjectNotFoundException)3 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)3 ResourceType (com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType)3 Label (org.apache.wicket.markup.html.basic.Label)3 AbstractReadOnlyModel (org.apache.wicket.model.AbstractReadOnlyModel)3 PropertyModel (org.apache.wicket.model.PropertyModel)3 AjaxButton (com.evolveum.midpoint.web.component.AjaxButton)2 ListDataProvider (com.evolveum.midpoint.web.component.util.ListDataProvider)2 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)2 WorkItemsPanel (com.evolveum.midpoint.web.component.wf.WorkItemsPanel)2