use of com.evolveum.midpoint.gui.impl.page.admin.assignmentholder.FocusDetailsModels in project midpoint by Evolveum.
the class RoleCatalogItemButton method targetObjectDetailsPerformed.
private void targetObjectDetailsPerformed(AssignmentEditorDto assignment, AjaxRequestTarget target) {
if (assignment.getTargetRef() == null || assignment.getTargetRef().getOid() == null) {
return;
}
if (!plusIconClicked) {
OperationResult result = new OperationResult(OPERATION_LOAD_OBJECT);
Task task = getPageBase().createSimpleTask(OPERATION_LOAD_OBJECT);
if (AssignmentEditorDtoType.ORG_UNIT.equals(assignment.getType())) {
PrismObject<OrgType> object = WebModelServiceUtils.loadObject(OrgType.class, assignment.getTargetRef().getOid(), getPageBase(), task, result);
getPageBase().navigateToNext(new PageOrg(object) {
private static final long serialVersionUID = 1L;
@Override
protected FocusDetailsModels<OrgType> createObjectDetailsModels(PrismObject<OrgType> object) {
return new FocusDetailsModels<OrgType>(createPrismObjectModel(object), this) {
private static final long serialVersionUID = 1L;
@Override
protected boolean isReadonly() {
return true;
}
};
}
});
} else if (AssignmentEditorDtoType.ROLE.equals(assignment.getType())) {
PrismObject<RoleType> object = WebModelServiceUtils.loadObject(RoleType.class, assignment.getTargetRef().getOid(), getPageBase(), task, result);
getPageBase().navigateToNext(new PageRole(object) {
private static final long serialVersionUID = 1L;
@Override
protected FocusDetailsModels<RoleType> createObjectDetailsModels(PrismObject<RoleType> object) {
return new FocusDetailsModels<RoleType>(createPrismObjectModel(object), this) {
private static final long serialVersionUID = 1L;
@Override
protected boolean isReadonly() {
return true;
}
};
}
});
} else if (AssignmentEditorDtoType.SERVICE.equals(assignment.getType())) {
PrismObject<ServiceType> object = WebModelServiceUtils.loadObject(ServiceType.class, assignment.getTargetRef().getOid(), getPageBase(), task, result);
getPageBase().navigateToNext(new PageService(object) {
private static final long serialVersionUID = 1L;
@Override
protected FocusDetailsModels<ServiceType> createObjectDetailsModels(PrismObject<ServiceType> object) {
return new FocusDetailsModels<ServiceType>(createPrismObjectModel(object), this) {
private static final long serialVersionUID = 1L;
@Override
protected boolean isReadonly() {
return true;
}
};
}
});
}
} else {
plusIconClicked = false;
}
}
use of com.evolveum.midpoint.gui.impl.page.admin.assignmentholder.FocusDetailsModels in project midpoint by Evolveum.
the class TreeTablePanel method createMemberPanel.
private com.evolveum.midpoint.gui.impl.page.admin.org.component.OrgMemberPanel createMemberPanel(OrgType org) {
FocusDetailsModels focusDetailsModels = new FocusDetailsModels(createOrgModel(org), getPageBase());
com.evolveum.midpoint.gui.impl.page.admin.org.component.OrgMemberPanel memberPanel = new com.evolveum.midpoint.gui.impl.page.admin.org.component.OrgMemberPanel(ID_MEMBER_PANEL, focusDetailsModels, null) {
private static final long serialVersionUID = 1L;
@Override
protected List<QName> getSupportedRelations() {
return WebComponentUtil.getCategoryRelationChoices(AreaCategoryType.ORGANIZATION, TreeTablePanel.this.getPageBase());
}
};
memberPanel.setOutputMarkupId(true);
return memberPanel;
}
Aggregations