Skip to content
Snippets Groups Projects
Commit 09b4cd73 authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

deprecate ProcessHandlingUtils.getOnValidationValue

parent 0915c459
No related branches found
No related tags found
No related merge requests found
...@@ -11,22 +11,20 @@ import("system.vars"); ...@@ -11,22 +11,20 @@ import("system.vars");
function ProcessHandlingUtils() {} function ProcessHandlingUtils() {}
/** /**
* In onValidation-Process a local variable called "$local.value" is made available from kernel. * @deprecated THIS ERROR IS FIXED. YOU SHOULD USE vars.get("$local.value") DIRECTLY NOW
* 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, * In onValidation-Process a local variable called "$local.value" is made available from kernel.
* but the entered value now is the present one because the field has already been validated before. * It contains the entered value - the field contains the value only after successfull validation (vars.get("$field.Fieldname")).
* Otherwise a "variable not found" error would occur. * 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.
* @param {String} [fieldValue=current field value] value of the field onValidation-Process is executed ( e.g. vars.get("$field.Fieldname") ) * Otherwise a "variable not found" error would occur.
* *
* @return {String} Field value for onValidation-Process * @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) { ProcessHandlingUtils.getOnValidationValue = function(fieldValue) {
if (fieldValue == undefined) { return vars.get("$local.value");
fieldValue = vars.get("$this.value");
}
return (vars.exists("$local.value") && vars.get("$local.value") != null) ? vars.get("$local.value") : fieldValue;
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment