diff --git a/migration/354a-trunk/oracle/698_FR2947703_oracle.sql b/migration/354a-trunk/oracle/698_FR2947703_oracle.sql
new file mode 100644
index 0000000000..4e1e5e3420
--- /dev/null
+++ b/migration/354a-trunk/oracle/698_FR2947703_oracle.sql
@@ -0,0 +1,10 @@
+-- Mar 26, 2010 1:55:43 AM MYT
+-- automatic logout after inactivity - ID: 2947703
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,53099,0,TO_DATE('2010-03-26 01:55:36','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','The page or component you request is no longer available. This is normally caused by timeout or rebooting the server.','I',TO_DATE('2010-03-26 01:55:36','YYYY-MM-DD HH24:MI:SS'),100,'SessionTimeoutText')
+;
+
+-- Mar 26, 2010 1:55:43 AM MYT
+-- automatic logout after inactivity - ID: 2947703
+INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53099 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
+;
+
diff --git a/migration/354a-trunk/postgresql/698_FR2947703_postgresql.sql b/migration/354a-trunk/postgresql/698_FR2947703_postgresql.sql
new file mode 100644
index 0000000000..86c2bd4405
--- /dev/null
+++ b/migration/354a-trunk/postgresql/698_FR2947703_postgresql.sql
@@ -0,0 +1,10 @@
+-- Mar 26, 2010 1:55:43 AM MYT
+-- automatic logout after inactivity - ID: 2947703
+INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,53099,0,TO_TIMESTAMP('2010-03-26 01:55:36','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','The page or component you request is no longer available. This is normally caused by timeout or rebooting the server.','I',TO_TIMESTAMP('2010-03-26 01:55:36','YYYY-MM-DD HH24:MI:SS'),100,'SessionTimeoutText')
+;
+
+-- Mar 26, 2010 1:55:43 AM MYT
+-- automatic logout after inactivity - ID: 2947703
+INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53099 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID)
+;
+
diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java
index eccab24bba..674fba7082 100644
--- a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java
+++ b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/LoginPanel.java
@@ -55,6 +55,7 @@ import org.compiere.util.KeyNamePair;
import org.compiere.util.Language;
import org.compiere.util.Login;
import org.compiere.util.Msg;
+import org.zkoss.lang.Strings;
import org.zkoss.util.Locales;
import org.zkoss.zhtml.Div;
import org.zkoss.zhtml.Table;
@@ -422,6 +423,9 @@ public class LoginPanel extends Window implements EventListener
Locales.setThreadLocal(language.getLocale());
Clients.response("zkLocaleJavaScript", new AuScript(null, ZkFns.outLocaleJavaScript()));
+ String timeoutText = getUpdateTimeoutTextScript();
+ if (!Strings.isEmpty(timeoutText))
+ Clients.response("zkLocaleJavaScript2", new AuScript(null, timeoutText));
}
// This temporary validation code is added to check the reported bug
@@ -447,4 +451,14 @@ public class LoginPanel extends Window implements EventListener
}
+ private String getUpdateTimeoutTextScript() {
+ String msg = Msg.getMsg(Env.getCtx(), "SessionTimeoutText");
+ if (msg == null || msg.equals("SessionTimeoutText")) {
+ return null;
+ }
+ msg = Strings.escape(msg, "\"");
+ String s = "adempiere.store.set(\"zkTimeoutText\", \"" + msg + "\")";
+ return s;
+ }
+
}
diff --git a/zkwebui/WEB-INF/web.xml b/zkwebui/WEB-INF/web.xml
index 3ee76086a8..ed26366dd0 100644
--- a/zkwebui/WEB-INF/web.xml
+++ b/zkwebui/WEB-INF/web.xml
@@ -80,7 +80,7 @@
- 120
+ 60
@@ -159,7 +159,7 @@
index.zul
-
+
+
+
+ ADempiere WebUI Context management
+ org.adempiere.webui.session.SessionContextListener
+
+
+
[Optional] Monitor i3-log.conf and register a
handler for the specified log-base
@@ -21,18 +28,26 @@
-->
+
+ ajax
+
+ /timeout.zul
+
+
-
-
- ADempiere WebUI Context management
- org.adempiere.webui.session.SessionContextListener
-
-
+
+
+ ajax
+ org.zkoss.zkmax.ui.comet.CometServerPush
+
org.zkoss.zul.theme.fontSizeM
diff --git a/zkwebui/index.zul b/zkwebui/index.zul
index 78c104caf7..11efb9bdac 100644
--- a/zkwebui/index.zul
+++ b/zkwebui/index.zul
@@ -10,5 +10,9 @@ Copyright (C) 2007 Ashley G Ramdass.
+
\ No newline at end of file
diff --git a/zkwebui/timeout.zul b/zkwebui/timeout.zul
new file mode 100644
index 0000000000..0fa7af21d4
--- /dev/null
+++ b/zkwebui/timeout.zul
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+