Skip to content

Commit

Permalink
More rudimentary post-merge GUI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
semancik committed Mar 23, 2018
1 parent 747cba8 commit e3ac778
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 4 deletions.
Expand Up @@ -5,12 +5,15 @@
import com.evolveum.midpoint.gui.api.util.WebModelServiceUtils;
import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.prism.delta.ObjectDelta;
import com.evolveum.midpoint.prism.path.ItemPath;
import com.evolveum.midpoint.schema.GetOperationOptions;
import com.evolveum.midpoint.schema.SelectorOptions;
import com.evolveum.midpoint.schema.result.OperationResult;
import com.evolveum.midpoint.schema.util.OidUtil;
import com.evolveum.midpoint.security.api.AuthorizationConstants;
import com.evolveum.midpoint.task.api.Task;
import com.evolveum.midpoint.util.exception.SchemaException;
import com.evolveum.midpoint.util.exception.SystemException;
import com.evolveum.midpoint.util.logging.LoggingUtils;
import com.evolveum.midpoint.util.logging.Trace;
import com.evolveum.midpoint.util.logging.TraceManager;
Expand All @@ -21,7 +24,8 @@
import com.evolveum.midpoint.web.component.prism.ContainerStatus;
import com.evolveum.midpoint.web.component.prism.ObjectWrapper;
import com.evolveum.midpoint.web.component.prism.ObjectWrapperFactory;
import com.evolveum.midpoint.web.component.prism.PrismObjectPanel;
import com.evolveum.midpoint.web.component.prism.PrismPanel;
import com.evolveum.midpoint.web.model.ContainerWrapperListFromObjectWrapperModel;
import com.evolveum.midpoint.web.resource.img.ImgResources;
import com.evolveum.midpoint.web.util.OnePageParameterEncoder;
import com.evolveum.midpoint.xml.ns._public.common.common_3.*;
Expand Down Expand Up @@ -130,7 +134,11 @@ private ObjectWrapper<CaseType> loadCase() {
} catch (Exception ex) {
result.recordFatalError("Couldn't get case.", ex);
LoggingUtils.logUnexpectedException(LOGGER, "Couldn't load case", ex);
wrapper = owf.createObjectWrapper("PageCase.details", null, caseInstance, null, null, status);
try {
wrapper = owf.createObjectWrapper("PageCase.details", null, caseInstance, null, null, status);
} catch (SchemaException e) {
throw new SystemException(e.getMessage(), e);
}
}

wrapper.setShowEmpty(emptyCase);
Expand All @@ -143,8 +151,12 @@ private void initLayout() {
Form mainForm = new Form(ID_MAIN_FORM);
add(mainForm);

PrismObjectPanel<CaseType> caseForm = new PrismObjectPanel<CaseType>(ID_CASE, caseModel, new PackageResourceReference(
ImgResources.class, ImgResources.HDD_PRISM), mainForm, this);
List<ItemPath> itemPath = new ArrayList<>();
itemPath.add(ItemPath.EMPTY_PATH);
PrismPanel<CaseType> caseForm = new PrismPanel<CaseType>(ID_CASE,
new ContainerWrapperListFromObjectWrapperModel<CaseType,CaseType>(caseModel, itemPath),
new PackageResourceReference(ImgResources.class, ImgResources.HDD_PRISM),
mainForm, null, this);
mainForm.add(caseForm);

initButtons(mainForm);
Expand Down
Expand Up @@ -271,6 +271,27 @@ public class AuthorizationConstants {
public static final QName AUTZ_UI_REPORTS_REPORT_CREATE_QNAME = new QName(NS_AUTHORIZATION_UI, "reportCreate");
public static final String AUTZ_UI_REPORTS_REPORT_CREATE_URL = NS_AUTHORIZATION_UI + "#reportCreate";

//Cases
public static final QName AUTZ_UI_CASES_ALL_QNAME = new QName(NS_AUTHORIZATION_UI, "casesAll");
public static final String AUTZ_UI_CASES_ALL_URL = NS_AUTHORIZATION_UI + "#casesAll";

public static final QName AUTZ_UI_CASES_ALLOCATED_TO_ME_QNAME = new QName(NS_AUTHORIZATION_UI, "casesAllocatedToMe");
public static final String AUTZ_UI_CASES_ALLOCATED_TO_ME_URL = NS_AUTHORIZATION_UI + "#casesAllocatedToMe";

public static final QName AUTZ_UI_CASE_QNAME = new QName(NS_AUTHORIZATION_UI, "case");
public static final String AUTZ_UI_CASE_URL = NS_AUTHORIZATION_UI + "#case";

public static final QName AUTZ_UI_CASE_DETAILS_QNAME = new QName(NS_AUTHORIZATION_UI, "caseDetails");
public static final String AUTZ_UI_CASE_DETAILS_URL = NS_AUTHORIZATION_UI + "#caseDetails";

public static final QName AUTZ_UI_CASE_WORK_ITEMS_ALLOCATED_TO_ME_QNAME = new QName(NS_AUTHORIZATION_UI, "caseWorkItemsAllocatedToMe");
public static final String AUTZ_UI_CASE_WORK_ITEMS_ALLOCATED_TO_ME_URL = NS_AUTHORIZATION_UI + "#caseWorkItemsAllocatedToMe";

public static final QName AUTZ_UI_CASE_WORK_ITEMS_ALL_QNAME = new QName(NS_AUTHORIZATION_UI, "caseWorkItemsAll");
public static final String AUTZ_UI_CASE_WORK_ITEMS_ALL_URL = NS_AUTHORIZATION_UI + "#caseWorkItemsAll";
public static final String AUTZ_UI_CASE_WORK_ITEM_URL = NS_AUTHORIZATION_UI + "#caseWorkItem";


//Certification
public static final String AUTZ_UI_CERTIFICATION_DEFINITIONS_URL = NS_AUTHORIZATION_UI + "#certificationDefinitions";
public static final String AUTZ_UI_CERTIFICATION_DEFINITION_URL = NS_AUTHORIZATION_UI + "#certificationDefinition";
Expand Down

0 comments on commit e3ac778

Please sign in to comment.