如果更改来自网格单击,则JSF组件不会更新 [英] JSF component doesn't update if changes came from grid click

查看:57
本文介绍了如果更改来自网格单击,则JSF组件不会更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个JSF/IceFaces应用程序,其中的屏幕分为3个部分.搜索字段,下面的网格和一些详细信息字段.当前,如果我在搜索字段中输入一些数据并单击搜索"按钮(!),则网格将显示结果,并调用某种方法,该方法会将第一个结果记录的详细信息放入网格下方的detail字段的支持bean中.这表明我将数据放入详细信息字段的方式没有问题.

I have a JSF/IceFaces application where there is a screen divided into 3 sections. Search fields, a grid and some details fields below. Currently if I enter some data into the search fields and click on a Search button (!) the grid shows the results and a certain method is called that puts the first result record's details into the backing beans of the details fields below the grid. This shows that there is no problem with the way I put data into the details fields.

但是我也有gridclicklistener方法,该方法想根据选择来更改详细信息字段.单击后,将使用正确的参数调用相同的方法,如果单击搜索"按钮后调用该方法,则该方法将很好地起作用.数据在支持bean中进行了更新,但是即使单击浏览器中的刷新"按钮,更改也不会呈现.

However I have a gridclicklistener method as well that would like to change the detail fields according to the selection. After the click the same method gets called with the correct parameters that works well if invoked after the click on the Search button. The data is updated in the backing beans but the changes are not rendered even if I click the refresh button in the browser.

我发现,如果单击搜索按钮,则会从InvokeApplicationPhase.execute调用数据更新方法.当我在网格之后到达此行时,则单击ApplyRequestValuesPhase.

I found that if I click on the search button, the data-updating-method gets called from InvokeApplicationPhase.execute. When I get to this line after the grid click then it is from the ApplyRequestValuesPhase.

您是否有什么想法可以使这种改变以及如何进行这项工作?

Do you have any ideas what could make this difference and how to get this work?

更新:

我可以在后备Bean中清楚地看到更新的值,但是即使在F5之后,它也根本不会反映在屏幕上.

I can clearly see the updated value in the backing bean but it is not reflected on screen at all, even after F5.

推荐答案

我不知道是什么引起了您的原始问题.

I don't know what is causing your original problem.

使用icefaces推送渲染器,但是您可以强制进行更新:

With the icefaces push renderer however you could force an update:

http://wiki.icefaces. org/display/ICE/Getting + Started + with + ICEfaces + 2#GettingStartedwithICEfaces2-icepush

这篇关于如果更改来自网格单击,则JSF组件不会更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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