IDEMPIERE-1935:in changepassword window, push "enter" key make waiting window never end

This commit is contained in:
hieplq 2014-05-07 22:27:23 +08:00
parent 7aa1fe51b2
commit 45ede791a4
2 changed files with 17 additions and 4 deletions

View File

@ -53,6 +53,7 @@ import org.zkoss.zhtml.Td;
import org.zkoss.zhtml.Tr;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zul.Image;
/**
@ -314,10 +315,7 @@ public class ResetPasswordPanel extends Window implements EventListener<Event>
{
if (event.getTarget().getId().equals(ConfirmPanel.A_OK))
{
if (txtAnswer != null && txtAnswer.isReadonly())
validateEmail();
else
validateResetPassword();
validate ();
}
else if (event.getTarget().getId().equals(ConfirmPanel.A_CANCEL))
{
@ -326,6 +324,15 @@ public class ResetPasswordPanel extends Window implements EventListener<Event>
}
}
public void validate (){
Clients.clearBusy();
if (txtAnswer != null && txtAnswer.isReadonly())
validateEmail();
else
validateResetPassword();
}
protected void validateEmail()
{
String email = txtEmail.getValue();

View File

@ -168,6 +168,12 @@ public class LoginWindow extends FWindow implements EventListener<Event>
changePasswordPanel.validateChangePassword();
return;
}
ResetPasswordPanel resetPasswordPanel = (ResetPasswordPanel)this.getFellowIfAny("resetPasswordPanel");
if (resetPasswordPanel != null){
resetPasswordPanel.validate();
return;
}
}
}