AjaxValidation demo

Description
This page displays a standard ajaxValidation component.
It enables an ajax validation in a textfield, triggered on blur.


In Action
Login :




TML Source code

		<t:form>
			Login : <t:textfield t:id="login" value="loginValue"
				t:mixins="exanpe/ajaxValidation"
				t:message="literal:Enter admin please"/>
			<br/><br/>
			<t:submit/>
		</t:form>
	



Java code

	@Property
    private String loginValue;

    @OnEvent(value = ExanpeEventConstants.AJAXVALIDATION_EVENT, component = "login")
    public AjaxValidationResult validateLogin(String login)
    {
        if (login != null && login.equalsIgnoreCase("admin"))
            return AjaxValidationResult.TRUE;

        return AjaxValidationResult.FALSE;
    }