【发布时间】:2013-11-28 21:45:44
【问题描述】:
我的页面上有:
<h:form id="qw">
<h:panelGrid columns="3" >
<h:outputLabel for="username" value="Login:"/>
<h:inputText id="username" value="#{userManager.userName}" required="true">
<f:ajax event="blur" render="usernameMessage"/>
</h:inputText>
<h:message id="usernameMessage" for="username" />
<h:outputLabel for="password" value="#{msg.password}"/>
<h:inputSecret id="password" value="#{userManager.password}" required="true">
<f:ajax event="blur" render="passwordMessage" />
</h:inputSecret>
<h:message id="passwordMessage" for="password" />
<h:commandButton value="#{msg.login}" action="#{userManager.login}">
<f:ajax execute="@form" render=" @form qw usernameMessage passwordMessage messages"/>
</h:commandButton>
</h:panelGrid>
</h:form>
<h:messages id="messages" globalOnly="true"/>
当我运行应用程序并单击“登录”按钮时,我收到此错误:
Error Message: Request failed with status 0 and reason
--------------------------------------------------------
Calling function:myfaces._impl.xhrCore._AjaxRequest
Error Name: httpError
这是什么意思?怎么了?我不能在 Ajax 中使用 h:commandButton?
【问题讨论】:
标签: ajax jsf jsf-2 commandbutton