1
我们正在将应用程序从jsf 1.2迁移到jsf 2.0,并将Ajax4JSF(ajax4jsf-1.1.1)升级到Richfaces 4.2.2。 在我们的旧代码中,有些地方使用org.ajax4jsf.framework.ajax.AjaxActionComponent以编程方式设置某些组件的'rerender'属性。相关代码如下:Richfaces 4 - 替代AjaxActionComponent
public void changeReRender(UIComponent comp){
AjaxActionComponent commandAjax = (AjaxActionComponent)comp;
HashSet values = new HashSet();
values.add("idToBeRerendered");
commandAjax.setReRender(values);
}
但在RichFaces的4 AjaxActionComponent类中删除。 是否有一个类可以用来代替AjaxActionComponent,或者以其他方式通过编程方式更改UIComponent的'rerender'属性?
所以,我不应该将id的渲染与UIComponent的相关联,而是使用PartialViewContext来代替? – Rony 2013-03-19 16:49:10
@Rony正是由于JSF2的半本地ajax支持; Ajax处理不再是独立于组件的(至少在服务器端) – kolossus 2013-03-19 18:41:59