-
1. Re: Modal Window Close
samyem May 23, 2007 2:08 PM (in response to samyem)I found the answer myself after a few experiments:
<a4j:commandButton reRender="exceptionRegion" data="#{exceptionBean.status}" oncomplete="javascript:(data?parent.closeExceptionEditor():false)" actionListener="#{exceptionBean.onSave}" value="Save"/>
The exceptionBean.status resolves to a boolean value on my backing bean and it is set to false if we do not want the modal window to close down. -
2. Re: Modal Window Close
kirancsagi May 23, 2007 7:31 PM (in response to samyem)Can you please explain your solution in details.
Thanks in advance
Kiran C Sagi. -
3. Re: Modal Window Close
samyem May 23, 2007 9:01 PM (in response to samyem)I basically just wanted a way to control the closing event of a modal window from the server side. There are a few ways to do this but I was not sure what would be appropriate. My solution relied on using the "data" attribute of a4j:commandButton to convey the message to close or not to close to the javascript side. Hence you see my javascript snippet for the "oncomplete" event of the button. Not all that intuitive but it worked for me.
-
4. Re: Modal Window Close
ilya_shaikovsky May 24, 2007 7:03 AM (in response to samyem)Look please to http://labs.jboss.com/auth/wiki/ModalPanelValidation