It might be worth mentioning in the docs that when subclassing forms and
using i18n, you should place control creation in onInit(), instead of
the constructor.
This example will not use i18n, since getMessage() does not have a
parent context:
public class LoginForm extends Form {
public *LoginForm()* {
TextField username = new TextField("username",
getMessage("label_username"), true);
add(username);
}
}
This example works with i18n, at least, using onInit() is how I solved
this issue:
public class LoginForm extends Form {
public LoginForm() {
}
public *onInit()* {
TextField username = new TextField("username",
getMessage("label_username"), true);
add(username);
}
}
Is this assumption correct?
Cheers,
WarnerJan