Jsf 如何从iframe渲染a4j outputpanel
我在Jsf 如何从iframe渲染a4j outputpanel,jsf,iframe,Jsf,Iframe,我在iframe中有一个a4j:commandButton和一个a4j:outputPanel,其中iframe和面板都位于同一页面中。是否可以在该按钮上重新启动该面板 谢谢。使用标准JSF+A4J方法似乎不可能做到这一点。iframe中的内容是通过对独立视图的单独请求构建的,因此它有自己的JSF组件树。因此,a4j:commandButton和a4j:outputPanel处于不同的视图中(不同的组件树),不可能进行“交叉树”重新渲染 要从iframe访问父页面,可以尝试使用JavaScrip
iframe
中有一个a4j:commandButton
和一个a4j:outputPanel
,其中iframe和面板都位于同一页面中。是否可以在该按钮上重新启动该面板
谢谢。使用标准JSF+A4J方法似乎不可能做到这一点。
iframe
中的内容是通过对独立视图的单独请求构建的,因此它有自己的JSF组件树。因此,a4j:commandButton
和a4j:outputPanel
处于不同的视图中(不同的组件树),不可能进行“交叉树”重新渲染
要从iframe访问父页面,可以尝试使用JavaScript
例如,放入父页面jsFunction,如下所示:
<a4j:jsFunction name="reRenderPanel" reRender="panelId"/>
在iframe中,将以下onclick javascript添加到commandButton:
<a4j:commandButton onclick="parent.reRenderPanel();"/>
是
parent.reRenderPanel()代码>内置函数?父级是获取父页面实例,reRenderPanel是一个jsFunction name=“reRenderPanel”