I'm trying to create a twitter-like username checking feature, e.g.:
https://twitter.com/signup
For example, I want to check for the availability of a username as the user types some letters. The database should be checked for the availability of a username as each character that is typed in (i.e. onkeyup). I want to check the availability of the username via the database using a validator that I have written (in this case, it's a SLSB w/ Seam annotations - and yes, it does work). Here's my Facelets code so far:
<a:region> <s:decorate id="usernameDecoration" template="layout/edit.xhtml"> <ui:define name="label"> <h:outputText value="#{messages['username']}" /> </ui:define> <h:inputText id="username" disabled="#{customerHome.managed}" required="true" size="32" maxlength="32" value="#{customerHome.instance.username}"> <f:validator validatorId="availableUsernameValidator" /> <a:support event="onkeyup" reRender="usernameDecoration" bypassUpdates="true" ajaxSingle="true" /> </h:inputText> </s:decorate> </a:region>