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

陌路散爱 提交于 2019-12-25 02:12:59

问题


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.

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.

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?

Update:

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


回答1:


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

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

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



来源:https://stackoverflow.com/questions/8181723/jsf-component-doesnt-update-if-changes-came-from-grid-click

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!