防止缓存数据表中的数据 [英] Prevent caching data of a dataTable
问题描述
我有一个ice:dataTable
,并且在每一行中都有一个inputText
.每次在其他组件上触发valueChangeListener
时,记录列表都会更新.
重置记录列表时,浏览器在表行中显示inputText
字段的先前值.
I have a ice:dataTable
and in each row, there is a inputText
. The record list is updated every time when fire a valueChangeListener
on some other component.
When it resets the record list, browser shows the previous values for inputText
fields in table rows.
我尝试了Filter
和<meta/>
标签.它对我不起作用.
有人可以告诉我如何摆脱这个问题吗?
(备用bean保留实际的记录列表)
I tried both Filter
and <meta/>
tags. It didn't work for me.
Can somebody tell me how to get rid of this problem?
(Backing bean keeps the actual record list)
推荐答案
这是一个JSF问题,请查看以下答案以获取详细信息
This is a JSF problem, take a look at the following answer for details
为简单起见,JSF将值保留在partialViewContext中,因此您需要执行的所有操作来重置partialViewContext中的所有组件
To make it simple JSF keeps values in the partialViewContext so all what you have to do to reset all components in the partialViewContext
,或者如果您使用的是素数,则可以简单地添加< p:resetInput target ="tableId"/>到字段(嵌套在里面),或者如果您使用的是OmiFaces,则可以使用ResetInputAjaxActionListener
or if you are using primefaces you can simply add < p:resetInput target="tableId"/> to the field (nested inside) or if you are using OmiFaces then you can use ResetInputAjaxActionListener
这篇关于防止缓存数据表中的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!