Search in sources :

Example 41 with PageParameters

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

the class MultiButtonTable method targetObjectDetailsPerformed.

private void targetObjectDetailsPerformed(final AssignmentEditorDto assignment, AjaxRequestTarget target) {
    if (assignment.getTargetRef() == null || assignment.getTargetRef().getOid() == null) {
        return;
    }
    if (!plusIconClicked) {
        PageParameters parameters = new PageParameters();
        parameters.add(OnePageParameterEncoder.PARAMETER, assignment.getTargetRef().getOid());
        if (AssignmentEditorDtoType.ORG_UNIT.equals(assignment.getType())) {
            getPageBase().navigateToNext(PageOrgUnit.class, parameters);
        } else if (AssignmentEditorDtoType.ROLE.equals(assignment.getType())) {
            getPageBase().navigateToNext(PageRole.class, parameters);
        } else if (AssignmentEditorDtoType.SERVICE.equals(assignment.getType())) {
            getPageBase().navigateToNext(PageService.class, parameters);
        }
    } else {
        plusIconClicked = false;
    }
}
Also used : PageRole(com.evolveum.midpoint.web.page.admin.roles.PageRole) PageParameters(org.apache.wicket.request.mapper.parameter.PageParameters)

Example 42 with PageParameters

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

the class PageResource method initLayout.

private void initLayout() {
    if (resourceModel == null || resourceModel.getObject() == null) {
        return;
    }
    addOrReplace(createResourceSummaryPanel());
    addOrReplace(createTabsPanel());
    AjaxButton test = new AjaxButton(BUTTON_TEST_CONNECTION_ID, createStringResource("pageResource.button.test")) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            testConnectionPerformed(target);
        }
    };
    add(test);
    AjaxButton refreshSchema = new AjaxButton(BUTTON_REFRESH_SCHEMA_ID, createStringResource("pageResource.button.refreshSchema")) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            refreshSchemaPerformed(target);
        }
    };
    add(refreshSchema);
    AjaxButton editXml = new AjaxButton(BUTTON_EDIT_XML_ID, createStringResource("pageResource.button.editXml")) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            PageParameters parameters = new PageParameters();
            parameters.add(PageDebugView.PARAM_OBJECT_ID, resourceModel.getObject().getOid());
            parameters.add(PageDebugView.PARAM_OBJECT_TYPE, "ResourceType");
            navigateToNext(PageDebugView.class, parameters);
        }
    };
    add(editXml);
    AjaxButton configurationEdit = new AjaxButton(BUTTON_CONFIGURATION_EDIT_ID, createStringResource("pageResource.button.configurationEdit")) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            startWizard(true, false);
        }
    };
    add(configurationEdit);
    AjaxButton wizardShow = new AjaxButton(BUTTON_WIZARD_SHOW_ID, createStringResource("pageResource.button.wizardShow")) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            startWizard(false, true);
        }
    };
    add(wizardShow);
    AjaxButton wizardEdit = new AjaxButton(BUTTON_WIZARD_EDIT_ID, createStringResource("pageResource.button.wizardEdit")) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            startWizard(false, false);
        }
    };
    add(wizardEdit);
    AjaxButton back = new AjaxButton(ID_BUTTON_BACK, createStringResource("pageResource.button.back")) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            redirectBack();
        }
    };
    add(back);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) AjaxButton(com.evolveum.midpoint.web.component.AjaxButton) PageParameters(org.apache.wicket.request.mapper.parameter.PageParameters)

Example 43 with PageParameters

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

the class PageResource method startWizard.

private void startWizard(boolean configOnly, boolean readOnly) {
    PageParameters parameters = new PageParameters();
    // compatibility with PageAdminResources
    parameters.add(OnePageParameterEncoder.PARAMETER, resourceModel.getObject().getOid());
    parameters.add(PageResourceWizard.PARAM_CONFIG_ONLY, configOnly);
    parameters.add(PageResourceWizard.PARAM_READ_ONLY, readOnly);
    setResponsePage(new PageResourceWizard(parameters));
}
Also used : PageParameters(org.apache.wicket.request.mapper.parameter.PageParameters)

Example 44 with PageParameters

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

the class PageConnectorHosts method editAsXmlPerformed.

private void editAsXmlPerformed(ResourceType resourceType) {
    PageParameters parameters = new PageParameters();
    parameters.add(PageDebugView.PARAM_OBJECT_ID, resourceType.getOid());
    parameters.add(PageDebugView.PARAM_OBJECT_TYPE, ResourceType.class.getSimpleName());
    navigateToNext(PageDebugView.class, parameters);
}
Also used : ResourceType(com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType) PageParameters(org.apache.wicket.request.mapper.parameter.PageParameters)

Example 45 with PageParameters

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

the class PageResources method editResourcePerformed.

private void editResourcePerformed(ResourceType resourceType) {
    PageParameters parameters = new PageParameters();
    parameters.add(OnePageParameterEncoder.PARAMETER, resourceType.getOid());
    navigateToNext(new PageResourceWizard(parameters));
}
Also used : PageParameters(org.apache.wicket.request.mapper.parameter.PageParameters)

Aggregations

PageParameters (org.apache.wicket.request.mapper.parameter.PageParameters)56 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)7 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)7 ArrayList (java.util.ArrayList)6 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 StringResourceModel (org.apache.wicket.model.StringResourceModel)4 EditUserPage (org.devgateway.toolkit.forms.wicket.page.user.EditUserPage)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 ICellPopulator (org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator)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