0 Replies Latest reply on Jan 8, 2015 5:29 AM by Stephane Appercel

    Popup Panel is auto-sized before the images are loaded

    Stephane Appercel Newbie

      My main page has a conditionally rendered popup panel. When some condition arises server side, the popup panel is rendered, and is immediately displayed (show="true").

       

      Code snapshot:

       

      <h:panelGroup rendered=#{dialogLogic.dialogRendered}>
           <rich:popupPanel show="true" autosized="true" modal="true"domElementAttachment="parent">
                <div>
                     <h:graphicImage value="some-img"/>
                </div>
           </rich:popupPanel>
      </h:panelGroup>
      

       

      The problem is quite simple: the first time the popup panel is rendered, it has an incorrect size. By incorrect, I mean that it's size is computed as if the image had a 0 size. I had a look to what happened in the browser, and I could see that the size of the popup panel is computed before the image is actually loaded. Then, when the popup panel is rendered again later, it has a correct size, because the image is in the browser cache.

       

      Question:

      Do I have a mean to tell richfaces to compute the size of the popup panel after the image is loaded?

       

      Thanks in advance for your support.