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;
}
}
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);
}
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));
}
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);
}
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));
}
Aggregations