I'm using smartgwt 2.1.0 and FF.
I want to to validate float values but the default DataSourceFloatFieldField doesn't allow to validate comma separated numbers like: 13,5. I was reading in the forum and I found one way is to define new type. Like this one:
The problem is that I send to the database an incorrect number and doesn't save my value.
Is some way to redefine number formmating (comma instead point as separator), or replace the value of datasoucefield before to send to my database?
Thanks in advance
I want to to validate float values but the default DataSourceFloatFieldField doesn't allow to validate comma separated numbers like: 13,5. I was reading in the forum and I found one way is to define new type. Like this one:
Code:
public EuropeanFloatType() { super("EuropeanFloatType", FieldType.TEXT); RegExpValidator validator = new RegExpValidator("^[-+]?\\d+(\\,\\d+)?$"); validator.setErrorMessage("Valor no válido"); setValidators(validator); }
Is some way to redefine number formmating (comma instead point as separator), or replace the value of datasoucefield before to send to my database?
Thanks in advance
Comment