0 Replies Latest reply on Jul 31, 2007 3:34 AM by Chris Malan

    Dynamically sized pop-up window

    Chris Malan Novice

      Any idea how to implement a pop-up window just big enough for an image? I don't know what size images are going to be uploaded.

      This is how I've done the pop-up, and it works:

      pages.xml

      <page view-id="/search.xhtml">
       <navigation from-action="#{searchSessionBean.setPhoto}">
       <render view-id="/hppu.xhtml"/>
       </navigation>
      </page>
      


      and on the view:
      <h:column>
       <f:facet name="header">Show the Photo</f:facet>
       <s:link target="PopUp" onclick="window.open(null,'PopUp','width=270,height=290')"
      value="Show the Photo" action="#{searchSessionBean.setPhoto}" />
      </h:column>
      


      Incidentally, not using pages.xml and supplying the URL of the pop-up page does not work. The page that pops up is the same as the page on which the link was clicked. The same goes for using navigation.xml