Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #175 from zanata/rhbz1002340-openid-username
Browse files Browse the repository at this point in the history
rhbz1002340 - prevent ajax race condition
  • Loading branch information
Alex Eng committed Sep 12, 2013
2 parents bf11906 + 1204fe5 commit 65f5bb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
6 changes: 0 additions & 6 deletions zanata-war/src/main/java/org/zanata/action/ProfileAction.java
Expand Up @@ -121,12 +121,6 @@ private void validateUsername(String username)
}
}

public void verifyUsernameAvailable(ValueChangeEvent e)
{
String username = (String) e.getNewValue();
validateUsername(username);
}

@Create
public void onCreate()
{
Expand Down
5 changes: 2 additions & 3 deletions zanata-war/src/main/webapp/profile/edit.xhtml
Expand Up @@ -36,9 +36,8 @@
</ui:remove>
<s:decorate id="usernameField" template="../WEB-INF/layout/edit.xhtml" rendered="#{profileAction.newUser}" enclose="true">
<ui:define name="label">#{messages['jsf.Username']}</ui:define>
<h:inputText id="username" value="#{profileAction.username}" required="true"
valueChangeListener="#{profileAction.verifyUsernameAvailable}" onchange="submit()" >
<a4j:ajax event="blur" render="usernameField" execute="@this"/>
<h:inputText id="username" value="#{profileAction.username}" required="true">
<a4j:ajax event="blur" render="usernameField" execute="@this"/>
</h:inputText>

<s:span styleClass="icon-info-circle-2 input_help" id="usernameHelp">
Expand Down

0 comments on commit 65f5bb8

Please sign in to comment.