External Reference to Richfaces modal
I need to get a
开发者_如何学C<rich:modalPanel id="mod1" .../>
component to load an external page on "show" action, defined as:
<a4j:commandButton value="link" id="l1" reRender="mod1" oncomplete="Richfaces.showModalPanel('mod1')">
<f:setPropertyActionListener target="#{mybean.someParam}" value="#{myOtherbean.someOtherparam}" />
</a4j:commandButton>
. My first try was with
<rich:modalPanel id="mod1">
<ui:include src="#{mybean.generateURL}"/>
</rich:modalPanel>
but it just throws me a 404 page not found error, typing the generated URL directly into the address bar works perfectly fine.
Does anyone know what's causing the problem , or what's the correct way to do this?
The system is running on seam/richfaces.
Thanks!
You can't use <x:include>
to include external pages. You have two options:
- As Damo suggested in the comments, use an
<iframe>
inside the modal - use a bean of yours to load the contents of the target url (via
URL.openConnection()
) and output them in a page, which you can then include.
精彩评论