column-level validation questions

Forum to discuss the Web client version of Servoy.

column-level validation questions

Postby amcgilly » Wed Nov 21, 2007 12:20 am

I'm checking out the cool column-level validation features of 3.5 and I have a few questions.

Say I create a GlobalMethodValidator on a column called city that returns false for invalid data.

1. In the Java Client it works great - I can't leave the field unless I put valid data in it. In the Web Client, I can get out of the field if I just hit tab twice. Is this a bug?

2. If the user enters invalid data, I get a default Servoy 'Invalid Input' message in a dialog (Java Client only). If I want to customize that message, I can display the message I want in the global validator method, but then I will get both my message and the default Servoy-generated mesage. To suppress the Servoy-generated message I am creating an onError method that does this:

Code: Select all
var e = arguments[0];
if (e.isServoyException)
{
  if (e.getErrorCode() == ServoyException.INVALID_INPUT)
  {
     return;
  }
}


Is there a smarter way to customize my validation messaging or is this it?

Thank you.
Adrian McGilly
Servoy Developer

Image
amcgilly
 
Posts: 375
Joined: Fri Dec 09, 2005 12:03 am
Location: San Francisco, CA

Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 5 guests