Skip to content

Instantly share code, notes, and snippets.

@amaltson
Created October 19, 2010 14:45
Show Gist options
  • Save amaltson/634307 to your computer and use it in GitHub Desktop.
Save amaltson/634307 to your computer and use it in GitHub Desktop.
GWT UI that has logic.
/**
* A simple login view.
*/
public class LoginView {
private TextBox username;
private TextBox password;
public LoginView(TextBox username, TextBox password) {
this.username = username;
this.password = password;
}
public boolean validUsernameAndPassword() {
String inputUsername = username.getText();
String inputPassword = password.getText();
return inputUsername.length() > 3 && inputPassword.length() > 3;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment