CrizztlCoder
5 Aug 2010, 12:26 AM
- 2.1.3
- Host mode and web mode
- Firefox 3.6.8 / IE7
- Operating System MS WinXP Pro SP3
When using a customized invalid-text on Fields, it is not possible to use html entities (like ü , ¶ ).
The markInvalid function of Field calls Format.htmlEncode() which replaces all occurences of & with &
Thus ü becomes ü and is not display as ü.
public class Test implements EntryPoint {
public void onModuleLoad() {
final TextField<String> text = new TextField<String>();
Validator val = new Validator() {
public String validate(Field<?> field, String value) {
if(text.getValue().length() > 10) {
return "ümlaut";
}
else {
return null;
}
}
};
text.setValidator(val);
RootPanel.get().add(text);
}
}
- Host mode and web mode
- Firefox 3.6.8 / IE7
- Operating System MS WinXP Pro SP3
When using a customized invalid-text on Fields, it is not possible to use html entities (like ü , ¶ ).
The markInvalid function of Field calls Format.htmlEncode() which replaces all occurences of & with &
Thus ü becomes &uuml; and is not display as ü.
public class Test implements EntryPoint {
public void onModuleLoad() {
final TextField<String> text = new TextField<String>();
Validator val = new Validator() {
public String validate(Field<?> field, String value) {
if(text.getValue().length() > 10) {
return "ümlaut";
}
else {
return null;
}
}
};
text.setValidator(val);
RootPanel.get().add(text);
}
}