[richfaces-issues] [JBoss JIRA] (RF-13115) a4j:jsFunction is not firing ajax request when the generated js function is called at window.unload event

Lukáš Fryč (JIRA) jira-events at lists.jboss.org
Mon Aug 5 10:27:26 EDT 2013


    [ https://issues.jboss.org/browse/RF-13115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12795106#comment-12795106 ] 

Lukáš Fryč commented on RF-13115:
---------------------------------

Did a little bit more search, seems you could use onbeforeunload.
https://developer.mozilla.org/en-US/docs/Web/API/window.onbeforeunload#Browser_compatibility

At least you can cancel the unload and do your job.


                
> a4j:jsFunction is not firing ajax request when the generated js function is called at window.unload event
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: RF-13115
>                 URL: https://issues.jboss.org/browse/RF-13115
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 4.3.1
>         Environment: tomcat 6, windows 7 , IE 10 / chrome 28.0.1500.95
>            Reporter: Vaibhav Kapoor
>            Assignee: Juraj Húska
>
> Requirement : I need to call a method on backing bean on event of page unload. Approach : So i have created a a4j:jsFunction and am trying to call it on window.unload event. 
> Issue Description : When the page refreshes, js function attached to window.unload event is called and executes correctly. All statements in console.log() are called correctly. But, the method in the backing bean is never called.   

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the richfaces-issues mailing list