The support for localization (messages-customization per-se) isn't comfortable
enought.
I'm migrating from GWT-Ext [that was quick & easy]:
userName.setAllowBlank(false);
userName.setBlankText(messages.getDefaultBlankField());
now
userName.setRequired(true); // GOOD: more readable
...
...
BUT to set a customized error message i've found only this option:
...
RequiredIfValidator reqValidator = new RequiredIfValidator();
reqValidator.setExpression( new RequiredIfFunction() {
public boolean execute(FormItem formItem, Object value) {
return true;
}
});
reqValidator.setErrorMessage(messages.getDefaultBlankField());
userName.setValidators(reqValidator);
...Frankly too much...
The option (more understandable)
userName.setRequiredMessage("New Req Msg");
[not exist]
...and the last
userName.setProperty("requiredField", "New Req Msg");
...Is not working...
Original issue reported on code.google.com by giovanni...@gmail.com on 23 Jan 2009 at 10:13
Original issue reported on code.google.com by
giovanni...@gmail.com
on 23 Jan 2009 at 10:13