Hello Guys,
I created a small library of my own FormItems and it used to work perfectly fine till last week that I upgraded to 6.0.
SmartGWT 6.0, GWT 2.6, all browsers !!!
below is a snippet of one of my items "DecimalItem".
Did someone experience the same behaviour? I cannot afford to rewrite the code at this point
if it's a bug I have to switch back to 5.0. till it's resolved.
I appreciate any help in advance......
I created a small library of my own FormItems and it used to work perfectly fine till last week that I upgraded to 6.0.
SmartGWT 6.0, GWT 2.6, all browsers !!!
below is a snippet of one of my items "DecimalItem".
- ValidateOnExit does not work
- Losing focus trims the digits and keeps the first one.
Code:
[SUB]
/**
* [USER="45788"]param[/USER] min
* [USER="45788"]param[/USER] max
* @return
*/
private FormItem createDeciamlItem(String min, String max) {
FloatItem floItem = new FloatItem();
FloatRangeValidator frv = null;
Validator[] v = null;
if (ToolBox.isStrNotEmpty(min)) {
frv = new FloatRangeValidator();
frv.setMin(Float.valueOf(min));
}
if (ToolBox.isStrNotEmpty(max)) {
frv = (frv == null ? new FloatRangeValidator() : frv);
frv.setMax(Float.valueOf(max));
}
if (frv != null) {
frv.setErrorMessage("Should be a positive number!");
v = new Validator[] {new IsFloatValidator(), frv};
} else {
v = new Validator[] {new IsFloatValidator()};
}
floItem.setValidators(v);
return floItem;
}[/SUB]
if it's a bug I have to switch back to 5.0. till it's resolved.
I appreciate any help in advance......
Comment