You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by mt...@apache.org on 2006/06/30 05:08:32 UTC
svn commit: r418178 - in /incubator/xap/trunk/src/xap: Xap.js
session/ClientSession.js
Author: mturyn
Date: Thu Jun 29 22:08:31 2006
New Revision: 418178
URL: http://svn.apache.org/viewvc?rev=418178&view=rev
Log:
Added parameter "toolkitType" to session creation methods in order to allow use of either dojo or Zimbra, the latter still the default. There is almost certainly a better way of doing this....
Modified:
incubator/xap/trunk/src/xap/Xap.js
incubator/xap/trunk/src/xap/session/ClientSession.js
Modified: incubator/xap/trunk/src/xap/Xap.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/Xap.js?rev=418178&r1=418177&r2=418178&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/Xap.js (original)
+++ incubator/xap/trunk/src/xap/Xap.js Thu Jun 29 22:08:31 2006
@@ -46,8 +46,8 @@
Xap.loadZimbra( sourceRootDir );
}
-Xap.createSession = function( context, startPage ) {
- var session = new ClientSession( context );
+Xap.createSession = function( context, startPage,toolkitType ) {
+ var session = new ClientSession( context,toolkitType );
session._start( startPage );
return session;
}
Modified: incubator/xap/trunk/src/xap/session/ClientSession.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/session/ClientSession.js?rev=418178&r1=418177&r2=418178&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/session/ClientSession.js (original)
+++ incubator/xap/trunk/src/xap/session/ClientSession.js Thu Jun 29 22:08:31 2006
@@ -27,7 +27,7 @@
//-----------------------------------------------------------------------
// Constructors.
//-----------------------------------------------------------------------
-ClientSession = function( webappContext ) {
+ClientSession = function( webappContext,toolkitType ) {
this._namesToContainers = new Hashtable();
this._webappContext = webappContext;
@@ -60,7 +60,7 @@
//TODO handle this in a better way
- this._createInitialDocument();
+ this._createInitialDocument(toolkitType);
}
ClientSession.s_log = LogFactory.getLog( "ClientSession" );
@@ -240,8 +240,13 @@
return this._uiDocumentHandler;
}
-ClientSession.prototype._createInitialDocument = function() {
- var shell = new DwtShell( "MainShell", false, null, null, true );
+ClientSession.prototype._createInitialDocument = function(toolkitType) {
+ var shell = null ;
+ if( toolkitType && toolkitType=="dojo"){
+ shell = document.body ;
+ } else {
+ shell = new DwtShell( "MainShell", false, null, null, true );
+ }
//create a zimbra shell object
//create an abstractTagImpl
var handler = new AbstractTagImpl();