Details
Description
-
Hide
- SC8053.war
- 6.38 MB
- Tyler Johnson
-
- META-INF/MANIFEST.MF 0.1 kB
- META-INF/context.xml 0.1 kB
- NotFoundPage.jspx 0.9 kB
- WEB-INF/classes/BackingBean.class 1 kB
- WEB-INF/faces-config.xml 0.9 kB
- WEB-INF/lib/FastInfoset.jar 285 kB
- WEB-INF/lib/backport-util-concurrent.jar 343 kB
- WEB-INF/lib/commons-beanutils.jar 113 kB
- WEB-INF/lib/commons-collections.jar 162 kB
- WEB-INF/lib/commons-digester.jar 104 kB
- WEB-INF/lib/commons-discovery.jar 75 kB
- WEB-INF/lib/commons-el.jar 110 kB
- WEB-INF/lib/commons-fileupload.jar 87 kB
- WEB-INF/lib/commons-lang.jar 240 kB
- WEB-INF/lib/commons-logging.jar 30 kB
- WEB-INF/lib/icefaces-comps.jar 1.91 MB
- WEB-INF/lib/icefaces-facelets.jar 596 kB
- WEB-INF/lib/icefaces.jar 1.05 MB
- WEB-INF/lib/jsf-api.jar 353 kB
- WEB-INF/lib/jsf-impl.jar 813 kB
- WEB-INF/lib/jstl.jar 20 kB
- WEB-INF/.../krysalis-jCharts-1.0.0-alpha-1.jar 151 kB
- WEB-INF/web.xml 4 kB
- css/default.css 0.7 kB
- header.jspx 0.5 kB
- image1.gif 2 kB
- image1_1.gif 2 kB
- image2.gif 2 kB
- image2_1.gif 2 kB
- loginCore.jspx 0.7 kB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Here are the provided event registration functions:
Ice.onSendReceive(id, sendCallback, receiveCallback)
id – the identifier of an element that is the parent or the child of the element owning the bridge instance (most of the time is the 'body' element)
sendCallback – callback invoked when the request is initiated
receiveCallback – callback invoked when response is received
Ice.onAsynchronousReceive(id, callback)
id – the identifier of an element that is the parent or the child of the element owning the bridge instance (most of the time is the 'body' element)
callback – callback invoked when a push response is received
Ice.onServerError(id, callback)
id – the identifier of an element that is the parent or the child of the element owning the bridge instance (most of the time is the 'body' element)
callback – callback invoked when server side error occurs, the callback gets the content/body of the response in its first parameter
Ice.onSessionExpired(id, callback)
id – the identifier of an element that is the parent or the child of the element owning the bridge instance (most of the time is the 'body' element)
callback – callback invoked when session expired or it was invalidated
Ice.onConnectionTrouble(id, callback)
id – the identifier of an element that is the parent or the child of the element owning the bridge instance (most of the time is the 'body' element)
callback – callback invoked when heartbeat pings are lost (asynchronous mode)
Ice.onConnectionLost(id, callback)
id – the identifier of an element that is the parent or the child of the element owning the bridge instance (most of the time is the 'body' element)
callback – callback invoked when connection to server was lost
For example, to show a popup on session expiry this is what is needed:
.......
<body id="document:body">
<script type="text/javascript">
Ice.onSessionExpired('document:body', function()
);
</script>
.......
I've tested the new onSessionExpiry method from the API and found the following:
1. When session expires naturally, Ice.onSessionExpired() is called and everything works great.
2. When I manually invalidate the session, the method is not called.
Attached is a sample app that reproduces the issue. It is a facelets application intended for deployment on tomcat 6. Run the application and click login. This will popup a new screen with a logout button and graphic image. Try letting the session timout naturally (set at 1 minute) and you will see that the javascript alert is called and that the window is automatically close (window.self.close() in the javascript). What I've noticed is that if you click logout (which invalidates the session), the js is not called. The javascript is in the facelets template.jspx file.
The logout test case used for testing the JS listener is not the best suited test for this issue. The logout process creates a border case situation where the framework specifically chooses not to send the session expired message to avoid shutting down the bridge to early. If the bridge is shut down, the redirection to login page would not work anymore. This logout specific logic is implemented in the update coalescing policy.
I recommend to change the test case so that redirection is not trigger, but only invalidate the session.
Added bridge and connection event notification methods.