From 09b4cd73ec5e84db579b21fabdf29bf03d53e166 Mon Sep 17 00:00:00 2001 From: Johannes Hoermann <j.hoermann@adito.de> Date: Tue, 23 Jul 2019 17:09:00 +0200 Subject: [PATCH] deprecate ProcessHandlingUtils.getOnValidationValue --- process/Entity_lib/process.js | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/process/Entity_lib/process.js b/process/Entity_lib/process.js index 6db3b2deba0..24029d5a797 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"); } /** -- GitLab