Checking for screen changes in the web UI framework
In screens created using the Web UI Framework, the application can take actions that are based on whether a screen field changed. For example, if you open a screen to modify a field, and you end up not modifying that field, you could program the application not to submit information from that screen to a server when you close the screen.
About this task
The isDirty method checks all of the fields of a screen to see if they have changed. Each editable field also has an isDirty method, so you can program the application to take actions based on whether a particular field changed.
Screen changes are also
monitored using a dirtystatechange event. Whenever a field is modified
on a screen, the dirtystatechange event is fired on the screen. In
the following example, the Save button is enabled
whenever a field on a screen is modified:
Screen.addListener('dirtystatechange',function(scr, isDirty)
{
savBtn.disable(!isDirty);
},
this);