-
1. Re: popup size dependent on browser window size?
jhuska May 15, 2012 9:41 AM (in response to bcn)1 of 1 people found this helpfulHi,
I think that you can achieve your desired functionality by following this demo:
http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=hashParam&skin=blueSky
To pass the size of the popup component via hash param to the popup's show method.
Is it helpful ?
-
2. Re: popup size dependent on browser window size?
bcn May 30, 2012 12:06 PM (in response to jhuska)Thanks, it was helpful. I use a slightly different version, because I don't use rich:componentControl, but an oncomplete="show".
So I send the width and height as request parameters to the server and use them to control the popup width/height.
<a4j:commandLink render="editPane" oncomplete="#{rich:component('editPane')}.show()">
<a4j:param noEscape="true" name="width" value="jQuery(window).width()-20" />
<a4j:param noEscape="true" name="height" value="jQuery(window).height()-20" />
<rich:popupPanel id="editPane" resizeable="true" width="#{param.width > 700 ? 700 : param.width}" height="#{param.height > 500 ? 500 : param.height}" modal="true" >