Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
basic
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xrm
basic
Commits
09b4cd73
Commit
09b4cd73
authored
5 years ago
by
Johannes Hörmann
Browse files
Options
Downloads
Patches
Plain Diff
deprecate ProcessHandlingUtils.getOnValidationValue
parent
0915c459
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
process/Entity_lib/process.js
+13
-15
13 additions, 15 deletions
process/Entity_lib/process.js
with
13 additions
and
15 deletions
process/Entity_lib/process.js
+
13
−
15
View file @
09b4cd73
...
...
@@ -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
"
);
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment