The onValueChangeFunction property identifies a function to be run each time a change occurs in the value of the field to which the property is assigned. EGL will call this function, using the user input as its only argument, during the JSF validation phase, but only if the value of the field has changed.
Use the EGL setError statement to indicate an error condition in the value change function.
Record CustomerRecord type BasicRecord
customerName STRING {displayUse=input};
creditOption INT {displayUse=input, onValueChangeFunction=checkOption};
end
function checkOption(num int in)
if ((num < 0) || (num > 10))
setError("Option must be between 1 and 9");
end
end
| Data item | JSF handler | VGUI record | Console UI | Text Form Java™ | Text Form COBOL | Print Form Java | Print Form COBOL |
|---|---|---|---|---|---|---|---|
| Yes | Yes | No | No | No | No | No | No |