在AJAX请求执行期间禁用按钮并更改标签

时间:2016-03-28 18:23:09

标签: jsf jsf-2.2

我想更改按钮标签并在执行期间禁用它

<h:form id="login_form" role="login" onkeypress="if (event.keyCode === 13) { document.getElementById('login_form:login').click(); return false; }">
    <img src="images/logo.png" alt="" class="img-responsive" />

    <div class="form-group">
        <h:inputText required="true" styleClass="form-control" a:placeholder="Email address" value="#{loginController.user}"/>
    </div>

    <div class="input-group">
        <h:inputSecret required="true" class="form-control" a:placeholder="Password" value="#{loginController.password}" autocomplete="off"/>

        <span class="input-group-btn">
            <button class="btn btn-default" type="button" id="tooltip" data-toggle="tooltip" data-placement="top" title="Forgot password ?">?</button>
        </span>
    </div>

    <h:commandLink id="login" type="submit" class="btn btn-primary btn-block button-layout" action="#{loginController.userAuthanticate}" value="Login Now">
        <f:ajax execute="@form" render="@form"/>
    </h:commandLink>

    Not yet a member ? <h:commandLink class="link-layout">Register now</h:commandLink>
</h:form>

我如何使用代码JSF执行此操作?

0 个答案:

没有答案