gpt4 book ai didi

RichFaces a4j :support should update the model in the context, 但不是实体

转载 作者:行者123 更新时间:2023-12-04 16:11:28 24 4
gpt4 key购买 nike

我有一个 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 Framework 论坛上读到这篇文章: Problems with AJAX and update model但这并没有真正的帮助。
我也有一些 action在我的 a4j:support这使得 entityManager.refresh()正如帖子中所写的那样,但是模型和实体仍然处于旧状态......

期待一些好的提示,谢谢!

(我使用 JSF 1.2,RichFaces 3.3.3)

最佳答案

使用 reRender 属性来更新模型,你所做的是在 reRender 属性中提到它的 id,你会得到结果。

<a4j:support event="onchange" reRender="userRegistrationForm" action="#{UserRegistrationBean.onChangeMenuCountry}"></a4j:support>

关于RichFaces a4j :support should update the model in the context, 但不是实体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13881271/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com