开发者

How to render a4j outputpanel from iframe

I have a a4j:commandButton in a iframe and a a4j:outputPanel where both of the iframe and the panel resides in a same page. Is it possible开发者_Go百科 to reRender that panel on that button click?

Thanks.


It looks to be not possible to be done using standard JSF+A4J approach. The content inside of iframe is build by a separate request to separate view, so it has its own JSF components tree. So a4j:commandButton and a4j:outputPanel are in different views (different components trees), and it is not possible to do 'cross-tree' rerender.

To access parent page from iframe you can try using JavaScript.

For example put to parent page jsFunction, like this:

<a4j:jsFunction name="reRenderPanel" reRender="panelId"/>

And in iframe add the following onclick javascript to commandButton:

<a4j:commandButton onclick="parent.reRenderPanel();"/>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜