简体   繁体   English

如果更改来自网格单击,则JSF组件不会更新

[英]JSF component doesn't update if changes came from grid click

I have a JSF/IceFaces application where there is a screen divided into 3 sections. 我有一个JSF / IceFaces应用程序,其中的屏幕分为3个部分。 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. 当前,如果我在搜索字段中输入一些数据并单击“搜索”按钮(!),则网格将显示结果,并调用某种方法,该方法会将第一个结果记录的详细信息放入网格下方的detail字段的支持bean中。 This shows that there is no problem with the way I put data into the details fields. 这表明我将数据放入详细信息字段的方式没有问题。

However I have a gridclicklistener method as well that would like to change the detail fields according to the selection. 但是,我也有gridclicklistener方法,该方法想根据选择更改详细信息字段。 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. 数据在后备Bean中更新,但是即使单击浏览器中的“刷新”按钮也不会呈现更改。

I found that if I click on the search button, the data-updating-method gets called from InvokeApplicationPhase.execute . 我发现如果单击搜索按钮, InvokeApplicationPhase.executeInvokeApplicationPhase.execute调用数据更新方法。 When I get to this line after the grid click then it is from the ApplyRequestValuesPhase . 当我单击网格后到达此行时,它来自ApplyRequestValuesPhase

Do you have any ideas what could make this difference and how to get this work? 您有什么想法可以使这种改变以及如何使这项工作吗?

Update: 更新:

I can clearly see the updated value in the backing bean but it is not reflected on screen at all, even after F5. 我可以在后备bean中清楚地看到更新的值,但是即使在F5之后,它也根本不会反映在屏幕上。

I don't know what is causing your original problem. 我不知道是什么引起您的原始问题。

With the icefaces push renderer however you could force an update: 使用icefaces push渲染器,您可以强制进行更新:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM