diff --git a/process/Entity_lib/process.js b/process/Entity_lib/process.js index 6db3b2deba0ad67d82b693ba8cd5e421a7f547d0..24029d5a797948b8987ff7fe7ff346d1d8e15630 100644 --- a/process/Entity_lib/process.js +++ b/process/Entity_lib/process.js @@ -11,22 +11,20 @@ import("system.vars"); function ProcessHandlingUtils() {} /** -* In onValidation-Process a local variable called "$local.value" is made available from kernel. -* It contains the entered value - the field contains the value only after successfull validation (vars.get("$field.Fieldname")). -* The onValidation-Process is running again before saving the entity, at this point there's "$local.value" varialbe no longer available, -* but the entered value now is the present one because the field has already been validated before. -* Otherwise a "variable not found" error would occur. -* -* @param {String} [fieldValue=current field value] value of the field onValidation-Process is executed ( e.g. vars.get("$field.Fieldname") ) -* -* @return {String} Field value for onValidation-Process -*/ + * @deprecated THIS ERROR IS FIXED. YOU SHOULD USE vars.get("$local.value") DIRECTLY NOW + * + * In onValidation-Process a local variable called "$local.value" is made available from kernel. + * It contains the entered value - the field contains the value only after successfull validation (vars.get("$field.Fieldname")). + * The onValidation-Process is running again before saving the entity, at this point there's "$local.value" varialbe no longer available, + * but the entered value now is the present one because the field has already been validated before. + * Otherwise a "variable not found" error would occur. + * + * @param {String} [fieldValue=current field value] value of the field onValidation-Process is executed ( e.g. vars.get("$field.Fieldname") ) + * + * @return {String} Field value for onValidation-Process + */ ProcessHandlingUtils.getOnValidationValue = function(fieldValue) { - if (fieldValue == undefined) { - fieldValue = vars.get("$this.value"); - } - - return (vars.exists("$local.value") && vars.get("$local.value") != null) ? vars.get("$local.value") : fieldValue; + return vars.get("$local.value"); } /**