Created
October 19, 2010 14:45
-
-
Save amaltson/634307 to your computer and use it in GitHub Desktop.
GWT UI that has logic.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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