[英]ICEFaces 1.8 Rendering in different portlets (liferay)
我有两个Portlet:第一个包含:数据表A ,第二个包含:数据表B。 这两个portlet显示在同一页面中。 单击数据表B中的命令按钮后,我想刷新数据表A。
命令按钮调用的方法包含以下代码:
OnDemandRenderer onDemandRenderer = getRenderManager().getOnDemandRenderer("RENDER_GROUP");
onDemandRenderer.requestRender();
但这是行不通的。 谁能帮我吗? 一些提示? 在此先感谢您的帮助!
我使用静态变量解决了问题。 数据表A使用以这种方式填充在托管Bean中的dataModel对象:
dataModel=new ListDataModel(globalDD.getDetailsList());
托管bean中的globalDD所在的位置:
private GlobalDocumentDetails globalDD;
public GlobalDocumentDetails getGlobalDD() {
return SessionBeanUtility.getGlobalDD();
}
public void setGlobalDD(GlobalDocumentDetails globalDD) {
this.globalDD = globalDD;
}
和SessionBeanUtility.getGlobalDD()是
public static GlobalDocumentDetails getGlobalDD(){
if (FacesUtil.getPortletSession().getAttribute(GLOBAL_DD_BEAN_KA, PortletSession.APPLICATION_SCOPE) == null)
{
new GlobalDocumentDetails();
FacesUtil.getPortletSession().setAttribute(GLOBAL_DD_BEAN_KA, new GlobalDocumentDetails(), PortletSession.APPLICATION_SCOPE);
}
return (GlobalDocumentDetails)FacesUtil.getPortletSession().getAttribute(GLOBAL_DD_BEAN_KA, PortletSession.APPLICATION_SCOPE);
}
数据表B包含购物车中的商品,并且该购物车是静态对象。 我使用我在两个数据表的actionListeners方法中的问题中编写的代码来刷新两者。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.