Using an event handler in code

Sometimes, we need to associate an event with entity fields using JavaScript code. In those cases, the execution context is automatically passed as the first parameter to the function. For example, let's say we have one field named "amount" and we want to execute a function when the user changes the value of that field. To implement this requirement, we can use the following code:

formContext.getAttribute("him_amount").addOnChange(amountOnChange);

We can use the preceding code to associate the OnChange event with this field. By doing this, the execution context will be automatically passed to our amountOnChange function.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.131.13.194