aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/Application.java
diff options
context:
space:
mode:
authorJouni Koivuviita <jouni.koivuviita@itmill.com>2008-04-07 09:30:40 +0000
committerJouni Koivuviita <jouni.koivuviita@itmill.com>2008-04-07 09:30:40 +0000
commit1b441ca92bba15de8ecae5a45fa7f632cce824b6 (patch)
tree6905a86d401f0ca9fb3131cb3343fac126fe80bd /src/com/itmill/toolkit/Application.java
parent56b135cbebebd237d0b10588153be294ef7490fc (diff)
downloadvaadin-framework-1b441ca92bba15de8ecae5a45fa7f632cce824b6.tar.gz
vaadin-framework-1b441ca92bba15de8ecae5a45fa7f632cce824b6.zip
-Enhancement: Application.setSessionExpiredURL now allows the developer to set the URL where to redirect the client after the application session has expired. The redirect is not pushed to the client, i.e. the client has to make a request to the expired application to get redirected.
-Minor modification to the session expired notification (onclick="window.location.reload()" was not working properly). -Enhancement: "closeApplication" parameter allows Testing Tools to close the application after tests. svn changeset:4134/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/Application.java')
-rw-r--r--src/com/itmill/toolkit/Application.java38
1 files changed, 35 insertions, 3 deletions
diff --git a/src/com/itmill/toolkit/Application.java b/src/com/itmill/toolkit/Application.java
index 5a18903fa1..6a7758f880 100644
--- a/src/com/itmill/toolkit/Application.java
+++ b/src/com/itmill/toolkit/Application.java
@@ -163,11 +163,18 @@ public abstract class Application implements URIHandler, Terminal.ErrorListener
private long lastResourceKeyNumber = 0;
/**
- * URL the user is redirected to on application close or null if application
- * is just closed
+ * URL where the user is redirected to on application close, or null if
+ * application is just closed without redirection.
*/
private String logoutURL = null;
+ /**
+ * URL where the user is redirected to when the Toolkit ApplicationServlet
+ * session expires, or null if the application is just closed without
+ * redirection.
+ */
+ private String expiredURL = null;
+
private Focusable pendingFocus;
/**
@@ -996,7 +1003,7 @@ public abstract class Application implements URIHandler, Terminal.ErrorListener
}
/**
- * Returns the URL user is redirected to on application close.If the URL is
+ * Returns the URL user is redirected to on application close. If the URL is
* <code>null</code>, the application is closed normally as defined by
* the application running environment.
* <p>
@@ -1025,6 +1032,31 @@ public abstract class Application implements URIHandler, Terminal.ErrorListener
}
/**
+ * Returns the URL where user is redirected to when the Toolkit
+ * ApplicationServlet session expires. If the URL is <code>null</code>,
+ * the application is closed normally and it shows a notification to the
+ * client.
+ *
+ * @return the URL.
+ */
+ public String getSessionExpiredURL() {
+ return expiredURL;
+ }
+
+ /**
+ * Sets the URL where user is redirected to when the Toolkit
+ * ApplicationServlet session expires. If the URL is <code>null</code>,
+ * the application is closed normally and it shows a notification to the
+ * client.
+ *
+ * @param expiredURL
+ * the expiredURL to set.
+ */
+ public void setSessionExpiredURL(String expiredURL) {
+ this.expiredURL = expiredURL;
+ }
+
+ /**
* <p>
* Invoked by the terminal on any exception that occurs in application and
* is thrown by the <code>setVariable</code> to the terminal. The default