4 Replies Latest reply on Nov 4, 2008 8:35 AM by Khaled Al-Shehri

    how to implement AJAXed check username availability

    Khaled Al-Shehri Newbie

      I'm trying to implement "check username availability" using AJAX.

      <f:view locale="#{language.locale}">
      <h:form id="mainForm">
      <h:outputText value="#{msg.webUserID}"/>
      <h:inputText value="#{createNewUser.user.webUserID}" id="webUserID" maxlength="20" required="true" rendered="#{not createNewUser.created}" >
       <f:validator validatorId="usernameValidator" />
       <rich:ajaxValidator event="onblur"/>
      <rich:message for="username"/>
      <h:commandButton id="submit" value="Create" action="#{addUser.add}" />

      Now it works fine "onblur" but i dont want the validation work in this event. I want to add link for this functionality.

      I want to run the validation on link clicked. So i will add a link beside the field "username". let say "Check Availability" link and when user clicks on this link, the validation shall work AJAXly.

      ANY IDEA ??