onDataChange is changed a bit.
from now on (3.0b2) you get the oldValue and newValue as arguments
and if you return false. Servoy will set the focus back into the field. And then onDataChange
is also called again if the user didn't change the value after so that again you can say "Still wrong value" and return false.
sample script:
var oldValue = arguments[0];
var newValue = arguments[1];
if(newValue == "1")
{
application.setStatusText("<html><body><font color='#ff0000'>Invalid value</font></body></html>");
return false
}
application.setStatusText("");
In servoy it is now not possible to jump to anyother field (record/listview or tableview) if the onDataChange tells us that
the validation did go wrong.