Validation 验证错误后如何在primefaces中输入输入

Validation 验证错误后如何在primefaces中输入输入,validation,primefaces,jsf-2,Validation,Primefaces,Jsf 2,我试图在数据表中输入输入(下面的示例代码)。解决这个问题真正困难的部分是我不能重现它。它在有效的错误消息下工作了一段时间,我能够重新输入数据。然后它会被一些坏数据卡住,并忽略后续的输入。我知道这是一个以前被问过的问题。我在(8岁)和其他帖子中尝试了所有的解决方案 一些“重置”解决方案的一个问题是,在验证错误之后,数据重置为原始模型数据,并且没有错误迹象,旧数据只是重新提交 这里是我的xhtml和验证器的非常简化的版本。再说一次,当我运行它时,它会工作。(我实际的xhtml显然更复杂)。然后,在多

我试图在数据表中输入输入(下面的示例代码)。解决这个问题真正困难的部分是我不能重现它。它在有效的错误消息下工作了一段时间,我能够重新输入数据。然后它会被一些坏数据卡住,并忽略后续的输入。我知道这是一个以前被问过的问题。我在(8岁)和其他帖子中尝试了所有的解决方案

一些“重置”解决方案的一个问题是,在验证错误之后,数据重置为原始模型数据,并且没有错误迹象,旧数据只是重新提交

这里是我的xhtml和验证器的非常简化的版本。再说一次,当我运行它时,它会工作。(我实际的xhtml显然更复杂)。然后,在多次输入好数据和坏数据之后,它会被一些坏数据卡住并停止更新。数据在datatable中这一事实可能是一个问题。如果有人有解决办法,请告诉我。在这一点上,即使是重置按钮中的解决方法也可以

<h:form id="swFormId">

<h:panelGrid columns="3">
    <h:outputText value="Simple"/>
    <p:commandButton id="submitId1" value="Submit" action="#{controller.submitAction}" update="@form">
        <!--<f:actionListener type="org.omnifaces.eventlistener.ResetInputAjaxActionListener"/>-->
    </p:commandButton>

    <p:commandButton value="Refresh" action="#{controller.refreshAction}" resetValues="true" update="@form"/>
</h:panelGrid>

<p:dataTable value="#{controller.swContainers}" var="swContainer" rows="5">
    <p:column headerText="Container">
        <p:outputLabel value="#{swContainer.containerNumber}"/>
    </p:column>

    <p:column headerText="Value">
        <p:inputText id="inputId" value="#{swContainer.currentSwLabel.phString}">
            <f:attribute name="aContainer" value="#{swContainer}"/>
            <f:validator validatorId="simpleValidator"/>
        </p:inputText>
        <h:message for="inputId" style="color:red"/>
    </p:column>
</p:dataTable>
我还尝试将以下内容从omnifaces添加到我的faces-config.xml

  <application>
    <action-listener>org.omnifaces.eventlistener.ResetInputAjaxActionListener</action-listener>
</application>

org.omnifaces.eventlistener.ResetInputAjaxActionListener

你能把这个问题写得完整些吗?否则我们可能会在你的情况下尝试不同的东西。另外,请阅读jsf信息页面。您指的是哪个jsf信息页面?
  <application>
    <action-listener>org.omnifaces.eventlistener.ResetInputAjaxActionListener</action-listener>
</application>