Extension points
This article describes the extension points available in the OIM.Attestation JavaScript that control the behavior of the survey view. It also describes how to change the number of survey objects shown in the admin view.
Override property control behavior
The OverridePropertyControlBehavior function allows you to include a custom lookup function for reference properties in a Survey. omada.attestation.configuration.gridCustomization.OverridePropertyControlBehaviour = function (surveyObjects, propertyName, isForm)
omada.attestation.configuration.gridCustomization.OverridePropertyControlBehaviour = function (surveyObjects, propertyName, isForm) {
if (propertyName === "RESAREA") {
customLookup = "resourceAreaCustomLookUp";
}
return {
customLookup: customLookup
};
}
function resourceAreaCustomLookUp(options) {
omada.dialogHelper.showDataObjectSelectionDialog(
{
lookupViewId: 'dacdd0b2-f5f3-41bc-9505-52e363d2e8df',
multiSelection: false,
title: "This is a custom lookup dialog for resource area",
negIds: options.currentSelection,
selectionCompleted: options.resultHandler
});
}
This function can override the default behavior of a property on a grid or form. The surveyObjects parameter contains all the properties of the survey. The control type of the property can be changed, as well as the default Enum values and changed event in case a control is transformed into a dropdown or similar supported type. omada.attestation.configuration.gridCustomization.OverridePropertyControlBehaviour = function (surveyObjects, propertyName, isForm)
.
Before show grid control
The function can be used to add additional logic to the grid before it is shown. The surveyObjects parameter contains all the properties of the survey, the property name is the name of the property as defined in the survey template, and the controlId parameter can be used to find the actual control in the DOM.
omada.attestation.configuration.gridCustomization.BeforeShowGridControl = function (surveyObject, propertyName, controlId)
Edit dialog before show
The function can be used to add additional logic to a dialog form before it is shown. The formData parameter contains all the fields in the dialog. The surveyObjects parameter contains all the properties of the survey.
omada.attestation.configuration.gridCustomization.EditDialogBeforeShow = function (surveyObjects, formData)