我有h:inputTextarea
一些a4j:support
来按需更新模型
<h:inputTextarea rows="15" id="taFreetext" value="#{customInput.value}"
required="true"
onkeyup="textAndLinesCount(#{rich:element('taFreetext')},document.getElementById('msgCounterLines'),20, 64);">
<a4j:support ajaxSingle="true" event="onchange" />
</h:inputTextarea>
我的问题是,当我按下一个键时,不仅我的上下文中的模型被更新,而且实体也会自动刷新!
此文件的page.xml
已将刷新模式设置为手动
<begin-conversation join="true" flush-mode="manual"/>
我在Seam框架论坛中阅读了这篇文章:Problems with AJAX and update model但这并没有真正帮助。
我的action
中也有a4j:support
个帖子中写有entityManager.refresh()
,但模型和实体仍处于旧状态...
期待一些好的提示,谢谢!
(我使用JSF 1.2,RichFaces 3.3.3)
答案 0 :(得分:0)
使用reRender属性来更新模型,你所做的就是在reRender属性中提到它的id,你将得到结果。
<a4j:support event="onchange" reRender="userRegistrationForm" action="#{UserRegistrationBean.onChangeMenuCountry}"></a4j:support>