The double request produced by FF is due to the DOM change in TrPanelPopup._calcPosition, where the popup is assigned to the enclosing form in spite of its current parent, usually a span. It appears that in such case FF refreshes the contents of the popup-contained iframes/objects, requesting the server for the same blobs as it already requested while building the page.
IE doesn't do it.
If I comment out parent.appendChild(popup), this second request is not emitted. Unfortunately this parent reassignement was performed in solving jira TRINIDAD-673. For the moment I don't see any other workaround than cloning my own version of TrPanelPopup.

-- Renzo

Renzo Tomaselli wrote:
Hi, in the context of displaying generic documents (images, pdf, etc.) I wanted to use a modal tr:panelPopup, containing an iframe to host actual document contents. Things such as:

<tr:panelPopup id="modal" position="centered" modal="true">
<iframe src="#{bean.blob}" type="#{bean.type}" width="400" height="400 frameborder="0"/>
...

Actual document contents are provided by the common trick of catching a resource request (src) in a phase listener and feeding the proper data stream into the response. Now the problem is that with this configuration, the iframe resource is requested twice on FF. Besides any performance loss, there are bad side effects since I store the document into the sesssion during first rendering (in bean.blob), to be retrieved and removed later, when the iframe requests the resource by next request. The second request will not find it anymore. But if the iframe is hosted by any other component on a normal page it is requested just once.
Any help is appreciated.





Reply via email to