-
1. Re: Session Expiration Handling
atarifreak73 Jul 24, 2012 4:33 AM (in response to atarifreak73)I have found another solution, I dont use the A4J-Object.
I didn´t know, JSF2 have a own Ajax-Object for Javascript. That´s my solution, and it works:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:a4j="http://richfaces.org/a4j" xmlns:ui="http://java.sun.com/jsf/facelets"> <ui:composition> <script type="text/javascript"> jsf.ajax.addOnError(function(data) { if (data.responseCode == 200) { if (window.confirm("Ihre Sitzung abgelaufen: Beim Klick auf OK wird eine neue Sitzung gestartet!")) self.location.href = "index.jsf"; } else alert(data.responseText); }); </script> </ui:composition> </html>
-
2. Re: Session Expiration Handling
healeyb Jul 24, 2012 8:46 AM (in response to atarifreak73)Which version of Richfaces is the relevant to? also what document are you referring to when say ch 5.6?
-
3. Re: Session Expiration Handling
atarifreak73 Jul 24, 2012 10:23 AM (in response to healeyb)I have messed the documentation for RF 4.0 with RF 4.2. Chapter 5.6 means this: http://docs.jboss.org/richfaces/4.0.X/4.0.0.CR1/Developer_Guide/en-US/html/chap-Developer_Guide-Advanced_features.html#sect-Developer_Guide-Advanced_features-Error_handling
My painful located solution is also there (on the correct doc-page, at least a tip): http://docs.jboss.org/richfaces/latest_4_2_X/Developer_Guide/en-US/html/chap-Developer_Guide-Advanced_features.html#sect-Developer_Guide-Advanced_features-Error_handling