Servoy 3.5.5
OS X 10.5.2
Java5
I think I have to be missing something very obvious here, but I cannot get an onDataChange validation method to work properly.
I have this simple method attached to the onDataChange of a text field, which is in turn attached to a global data provider. The onDataChange method returns ‘true’ when the validation is okay, and false when it fails (which i think i understand that how this is supposed to work?). The problem is though once validation fails, servoy never calls the onDataChange again after putting valid data in the field and the user is stuck there. Also if I hit the Esc key which I read is supposed to reset the field it closes the modal dialog window leaving the global set the the invalid data.
Here is the onDataChange method if that helps…
var old_value = arguments[0];
var new_value = arguments[1];
var result = globals.mod_sl_gCheckSkid(null, new_value);
if (result == false) {
plugins.dialogs.showWarningDialog('Invalid skid ID', 'Please enter a valid skid ID','OK');
return false;
} else {
return true;
}