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");
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");
}
/**
......
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