Hi, I’ve created 2 textfields (email, password) and a submit button in a window. The problem is that when the submit button is clicked, the getValue functions returns null values. I really wonder what the problem is…
Hi,
We’re going to need a little more information (read: code) than that to be able to say what’s wrong… How does the code for your submit button look, for example?
In the mean time, here is an example
class LoginWindow extends Window {
TextField user = new TextField("Username");
TextField password = new TextField("Password");
LoginWindow() {
super("Login"); // window caption
addComponent(user);
addComponent(password);
addComponent(new Button("Login", new Button.ClickListener() {
// inline click-listener
public void buttonClick(ClickEvent event) {
getMainWindow().showNotification(
user.getValue() + "/" + password.getValue());
}
}));
}
}
Best Regards,
Marc