constants.Login() );
final TextBox userName = new TextBox();
pop.addAttribute( constants.UserName(),
userName );
final PasswordTextBox password = new PasswordTextBox();
pop.addAttribute( constants.Password(),
password );
KeyPressHandler kph = new KeyPressHandler() {
public void onKeyPress(KeyPressEvent event) {
if ( KeyCodes.KEY_ENTER == event.getNativeEvent().getKeyCode() ) {
doLogin( userName,
password,
pop );
}
}
};
userName.addKeyPressHandler( kph );
password.addKeyPressHandler( kph );
Button b = new Button( constants.OK() );
b.addClickHandler( new ClickHandler() {
public void onClick(ClickEvent event) {
doLogin( userName,