平时都使用用Ajax4jsf来刷新JSF,最近使用primefaces 组件,用Ajax4jsf刷新primefaces 组件的方法如下:使用a4j:outputPanel 将要刷新的primefaces 组件包起来就可以,例子代码如下:
<a4j:outputPanel id="pgrowl">
<p:growl showDetail="true" sticky="true"/>
<a4j:outputPanel>
刷新使用的代码:
<a4j:commandButton reRender="pgrowl" ..........
本文介绍了一种使用Ajax4jsf来刷新PrimeFaces组件的方法。通过将PrimeFaces组件包裹在a4j:outputPanel中,并利用a4j:commandButton的reRender属性,可以实现局部刷新的效果。
507

被折叠的 条评论
为什么被折叠?



