0
我有一个JSF 2.0页以下:<f:ajax>第二次运行时不更新模型值?
<rich:column styleClass="tbl-weight" id="weight">
<f:facet name="header">
<h:outputText value="Weight" />
</f:facet>
<h:outputLabel value="lbs" for="lbs" />
<h:inputText size="3" id="lbs" label="lbs"
validatorMessage="Lbs must be from 0 to 999"
value="#{weighFamilyBacking.weightDecoratorMap[child].lbs}">
<f:validateLongRange minimum="0" maximum="999" />
<f:ajax event="change" render="@form" immediate="true"/>
</h:inputText>
<h:outputLabel value="oz" for="oz" />
<h:inputText size="3" id="oz" label="oz"
validatorMessage="Oz must be from 1 to 15"
value="#{weighFamilyBacking.weightDecoratorMap[child].oz}">
<f:validateLongRange minimum="0" maximum="15" />
<f:ajax event="change" render="currentPayoutOutput" />
</h:inputText>
<h:message styleClass="error" for="lbs" />
<h:message styleClass="error" for="oz" />
</rich:column>
<rich:column styleClass="tbl-payout" id="currentPayout">
<f:facet name="header">
<h:outputText id="payout" value="Payout" />
</f:facet>
<h:outputText id="currentPayoutOutput"
value="#{weighFamilyBacking.weightDecoratorMap[child].payout}" />
</rich:column>
当看着这个F:AJAX的“磅”和“盎司”投入应更新设置它们的值,然后导致currentPayoutOutput呈现。这只适用于对输入字段的第一次更改。
如果使用@form或者我使用currentPayoutOutput,这是相同的结果。使用阶段侦听器,我发现它从processValidations跳转到renderResponse。没有任何验证器消息正在显示。