use of com.evolveum.midpoint.web.page.admin.resources.component.TestConnectionResultPanel in project midpoint by Evolveum.
the class ConfigurationStep method testConnectionPerformed.
// copied from PageResource, TODO deduplicate
private void testConnectionPerformed(AjaxRequestTarget target) {
parentPage.refreshIssues(null);
if (parentPage.isReadOnly() || !isComplete()) {
return;
}
saveChanges();
PageBase page = getPageBase();
TestConnectionResultPanel testConnectionPanel = new TestConnectionResultPanel(page.getMainPopupBodyId(), resourceModelNoFetch.getObject().getOid(), getPage());
testConnectionPanel.setOutputMarkupId(true);
page.showMainPopup(testConnectionPanel, target);
// page.showResult(result, "Test connection failed", false);
target.add(page.getFeedbackPanel());
target.add(getForm());
}
use of com.evolveum.midpoint.web.page.admin.resources.component.TestConnectionResultPanel in project midpoint by Evolveum.
the class PageResource method testConnectionPerformed.
private void testConnectionPerformed(AjaxRequestTarget target) {
final PrismObject<ResourceType> dto = resourceModel.getObject();
if (dto == null || StringUtils.isEmpty(dto.getOid())) {
error(getString("pageResource.message.oidNotDefined"));
target.add(getFeedbackPanel());
return;
}
final TestConnectionResultPanel testConnectionPanel = new TestConnectionResultPanel(getMainPopupBodyId(), dto.getOid(), getPage()) {
private static final long serialVersionUID = 1L;
@Override
protected void okPerformed(AjaxRequestTarget target) {
refreshStatus(target);
}
};
testConnectionPanel.setOutputMarkupId(true);
getMainPopup().setCloseButtonCallback(new ModalWindow.CloseButtonCallback() {
private static final long serialVersionUID = 1L;
@Override
public boolean onCloseButtonClicked(AjaxRequestTarget target) {
return false;
}
});
showMainPopup(testConnectionPanel, target);
// if (!testConnectionPanel.isFocusSet()) {
// testConnectionPanel.setFocusSet(true);
// testConnectionPanel.setFocusOnComponent(testConnectionPanel.getOkButton(), target);
// }
}
Aggregations