これは、リッチフェイスのバグとして十分に文書化されています (バグ RF-11413 を参照)。
Richfaces ショーケースで試すことができます rich:dataTable -> 編集
私が見つけた唯一の解決策は次のとおりです: https://community.jboss.org/message/735198 (Eldin Okanovic からの回答を探します)
しかし、それは私にはうまくいかないので、私にとってはうまくいく同様の解決策を思いつきました。
xhtml rich:datatable で、a4j:commandLink action="#{carsBean.popupReset}"にアクションを追加します
<a4j:commandLink styleClass="no-decor" render="editGrid" execute="@this"
oncomplete="#{rich:component('editPane')}.show()" action="#{carsBean.popupReset}">
<h:graphicImage value="/images/icons/edit.gif" alt="edit" />
<a4j:param value="#{it.index}" assignTo="#{carsBean.currentCarIndex}"/>
<f:setPropertyActionListener target="#{carsBean.editedCar}" value="{car}" />
</a4j:commandLink>
CarsBean に、carsBean.popupReset メソッドを追加します。
public void popupReset() {
FacesContext context = FacesContext.getCurrentInstance();
UIInput com1 = (UIInput) context.getViewRoot().findComponent("form:price");
UIInput com2 = (UIInput) context.getViewRoot().findComponent("form:mage");
...
com1.resetValue();
com1.setValue(editedCar.getPrice());
com2.resetValue();
com2.setValue(editedCar.getMileage());
...
}
それはかなりの解決策ではありませんが、これまでのところ私にとってはうまくいきます。