Richfaces modalPanel与Ajax一起加载 [英] Richfaces modalPanel load with Ajax
问题描述
我在项目中使用了Richfaces,尤其是标签rich:modalPanel,它允许在页面中显示弹出窗口.
因此,我将这样的弹出窗口包括进来:
<ui:include src="popup.xhtml" />
此弹出窗口包含以下代码:
<rich:modalPanel id="sra" width="400" autosized="true" left="100" >
...
</rich:modalPanel>
最后要显示弹出窗口,请在主页上执行此操作:
<a4j:commandLink id="linkSRA" value="#{msg['SRA']}" action="#{controller.checkSRA}" oncomplete="#{rich:component('sra')}.show()" />
一切正常,但我的问题是下一个:
在一个页面中,我有很多弹出窗口,并且每个弹出窗口都包含在主页中.这个东西的重量很大,一无所有.因此,当我想加载弹出窗口时,如何在ajax中加载弹出窗口的内容?
谢谢
通过一些操作重新渲染面板内容,然后在oncomplete =中打开模式.
I use richfaces in my project and particularly the tag rich:modalPanel which allows to display popups in pages.
So to do this, I include my popup like this:
<ui:include src="popup.xhtml" />
This popup contains this code:
<rich:modalPanel id="sra" width="400" autosized="true" left="100" >
...
</rich:modalPanel>
Finally to display the popup, I do this in the main page:
<a4j:commandLink id="linkSRA" value="#{msg['SRA']}" action="#{controller.checkSRA}" oncomplete="#{rich:component('sra')}.show()" />
All work fine but my problem is the next:
In a page, I have many popup and each popup is included in the main page. The weight of this one is very big for nothing. So, how can I do to load the popup's content in ajax when I want to load a popup ?
Thanks
Re-render the panel content via some action and then open the modal in oncomplete=".."
这篇关于Richfaces modalPanel与Ajax一起加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!