防止缓存数据表中的数据 [英] Prevent caching data of a dataTable

查看:58
本文介绍了防止缓存数据表中的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆