I tried different ways to close the popup:
- The dialog shows closeIcon which closes the popup
- A button next to the inlineFrame with partialSubmit resets the url and closes the popup
- Autoclose enabled
Finally i had to avoid the whole popup to have a good result.
Instead of using a real popup i created a BTF based on pages with one page in it:
<f:view>
<af:document id="d1"
title="Online Postfach Mitteilung">
<af:form id="f1">
<af:panelStretchLayout id="psl1" bottomHeight="40px">
<f:facet name="center">
<af:inlineFrame id="if1" sizing="preferred"
source="#{myBean.URL}"/>
</f:facet>
</af:panelStretchLayout>
</af:form>
</af:document>
</f:view>
I embed this BTF as TF-Call in my BTF of the application and set the option to run as dialog:
Finally i had the exact same result but my close "X" from dialog avoids the second download of the pdf via the servlet in my inlineFrame.
The real problem here is that some browsers (specifically firefox I think) re-load the contents of the iframe when the DOM element is re-parented. When you show and hide a af:popup then exactly this happens so you can get this double loading. So it is possible to address this by deferring the setting of the source attribute on the inlineFrame using a poll. So initially you show the popup with the inlineFrame having an empty source (or pointing to a local HTML file) and then you reset and PPR to load the real doc.
AntwortenLöschenThanks Sir. solution worked for me
AntwortenLöschen