qooxdoo-commit Mailing List for qooxdoo (Page 1431)
Brought to you by:
ecker,
martinwittemann
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(453) |
Feb
(800) |
Mar
(247) |
Apr
(324) |
May
(172) |
Jun
(145) |
Jul
(265) |
Aug
(447) |
Sep
(271) |
Oct
(312) |
Nov
(327) |
Dec
(472) |
| 2007 |
Jan
(493) |
Feb
(631) |
Mar
(565) |
Apr
(469) |
May
(757) |
Jun
(460) |
Jul
(440) |
Aug
(411) |
Sep
(813) |
Oct
(339) |
Nov
(112) |
Dec
(215) |
| 2008 |
Jan
(423) |
Feb
(671) |
Mar
(578) |
Apr
(566) |
May
(498) |
Jun
(411) |
Jul
(845) |
Aug
(1208) |
Sep
(176) |
Oct
(144) |
Nov
(216) |
Dec
(353) |
| 2009 |
Jan
(363) |
Feb
(700) |
Mar
(416) |
Apr
(362) |
May
(292) |
Jun
(238) |
Jul
(243) |
Aug
(216) |
Sep
(287) |
Oct
(304) |
Nov
(300) |
Dec
(416) |
| 2010 |
Jan
(200) |
Feb
(200) |
Mar
(183) |
Apr
(259) |
May
(217) |
Jun
(241) |
Jul
(320) |
Aug
(330) |
Sep
(209) |
Oct
(217) |
Nov
(460) |
Dec
(392) |
| 2011 |
Jan
(338) |
Feb
(465) |
Mar
(1257) |
Apr
(433) |
May
(505) |
Jun
(417) |
Jul
(438) |
Aug
(241) |
Sep
(258) |
Oct
(223) |
Nov
(224) |
Dec
(172) |
| 2012 |
Jan
(151) |
Feb
(119) |
Mar
(220) |
Apr
(182) |
May
(236) |
Jun
(264) |
Jul
(188) |
Aug
(145) |
Sep
(186) |
Oct
(183) |
Nov
(243) |
Dec
(126) |
| 2013 |
Jan
(133) |
Feb
(165) |
Mar
(122) |
Apr
(116) |
May
(177) |
Jun
(177) |
Jul
(290) |
Aug
(150) |
Sep
(165) |
Oct
(168) |
Nov
(252) |
Dec
(152) |
| 2014 |
Jan
(109) |
Feb
(150) |
Mar
(135) |
Apr
(186) |
May
(235) |
Jun
(181) |
Jul
(193) |
Aug
(117) |
Sep
(118) |
Oct
(194) |
Nov
(207) |
Dec
(261) |
| 2015 |
Jan
(138) |
Feb
(218) |
Mar
(180) |
Apr
(141) |
May
(114) |
Jun
(24) |
Jul
(22) |
Aug
(14) |
Sep
(22) |
Oct
(11) |
Nov
(7) |
Dec
(10) |
| 2016 |
Jan
(1) |
Feb
(31) |
Mar
(13) |
Apr
(30) |
May
(34) |
Jun
(25) |
Jul
(16) |
Aug
(14) |
Sep
(21) |
Oct
(20) |
Nov
(6) |
Dec
|
|
From: Sebastian W. <wp...@us...> - 2006-01-19 10:59:56
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28730/source/script/core Modified Files: Tag: renderer QxConst.js Log Message: More major enhancements to new transport layer Index: QxConst.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/Attic/QxConst.js,v retrieving revision 1.1.2.19 retrieving revision 1.1.2.20 diff -C2 -d -r1.1.2.19 -r1.1.2.20 *** QxConst.js 17 Jan 2006 16:11:22 -0000 1.1.2.19 --- QxConst.js 19 Jan 2006 10:59:39 -0000 1.1.2.20 *************** *** 277,280 **** --- 277,284 ---- EVENT_TYPE_BEFOREREMOVEDOM : "beforeRemoveDom", EVENT_TYPE_REMOVEDOM : "removeDom", + + EVENT_TYPE_PREPARED : "prepared", + EVENT_TYPE_LOADING : "loading", + EVENT_TYPE_COMPLETE : "complete", BUTTON_LEFT : "left", |
|
From: Sebastian W. <wp...@us...> - 2006-01-18 22:10:24
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8229/source/script/widgets Modified Files: Tag: renderer QxTreeElement.js Log Message: Minor fix Index: QxTreeElement.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/widgets/QxTreeElement.js,v retrieving revision 1.3.2.46 retrieving revision 1.3.2.47 diff -C2 -d -r1.3.2.46 -r1.3.2.47 *** QxTreeElement.js 16 Jan 2006 16:11:57 -0000 1.3.2.46 --- QxTreeElement.js 18 Jan 2006 22:10:15 -0000 1.3.2.47 *************** *** 45,53 **** this._iconObject.setAnonymous(true); this._labelObject.setAnonymous(true); ! // Behaviour and Hard Styling this._labelObject.setSelectable(false); this._labelObject.setStyleProperty(QxConst.PROPERTY_LINEHEIGHT, QxConst.CORE_HUNDREDPERCENT); ! QxBoxLayout.call(this, QxConst.ORIENTATION_HORIZONTAL); --- 45,53 ---- this._iconObject.setAnonymous(true); this._labelObject.setAnonymous(true); ! // Behaviour and Hard Styling this._labelObject.setSelectable(false); this._labelObject.setStyleProperty(QxConst.PROPERTY_LINEHEIGHT, QxConst.CORE_HUNDREDPERCENT); ! QxBoxLayout.call(this, QxConst.ORIENTATION_HORIZONTAL); *************** *** 67,71 **** // Set Appearance this._iconObject.setAppearance("tree-element-icon"); ! this._labelObject.setAppearance("tree-element-label"); // Register event listeners --- 67,71 ---- // Set Appearance this._iconObject.setAppearance("tree-element-icon"); ! this._labelObject.setAppearance("tree-element-label"); // Register event listeners *************** *** 123,139 **** proto._modifySelected = function(propValue, propOldValue, propData) { ! var vState = propValue ? QxConst.STATE_SELECTED : QxConst.NOT_SELECTED; ! this.setSelectedState(vState); ! var vTree = this.getTree(); if (!vTree._fastUpdate || (propOldValue && vTree._oldItem == this)) { this._iconObject.setSelectedState(vState); }; ! this._labelObject.setSelectedState(vState); ! var vManager = this.getTree().getManager(); ! if (propOldValue && vManager.getSelectedItem() == this) { --- 123,139 ---- proto._modifySelected = function(propValue, propOldValue, propData) { ! var vState = propValue ? QxConst.STATE_SELECTED : QxConst.STATE_NOTSELECTED; ! this.setSelectedState(vState); ! var vTree = this.getTree(); if (!vTree._fastUpdate || (propOldValue && vTree._oldItem == this)) { this._iconObject.setSelectedState(vState); }; ! this._labelObject.setSelectedState(vState); ! var vManager = this.getTree().getManager(); ! if (propOldValue && vManager.getSelectedItem() == this) { *************** *** 144,148 **** vManager.setSelectedItem(this); }; ! return true; }; --- 144,148 ---- vManager.setSelectedItem(this); }; ! return true; }; |
|
From: Sebastian W. <wp...@us...> - 2006-01-18 21:51:59
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/managers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1707/source/script/managers Modified Files: Tag: renderer QxDragAndDropManager.js Log Message: Fixed drag and drop issue, minor code improvement Index: QxDragAndDropManager.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/managers/QxDragAndDropManager.js,v retrieving revision 1.9.2.34 retrieving revision 1.9.2.35 diff -C2 -d -r1.9.2.34 -r1.9.2.35 *** QxDragAndDropManager.js 16 Jan 2006 16:11:56 -0000 1.9.2.34 --- QxDragAndDropManager.js 18 Jan 2006 21:51:52 -0000 1.9.2.35 *************** *** 73,76 **** --- 73,88 ---- + /* + --------------------------------------------------------------------------- + HELPER + --------------------------------------------------------------------------- + */ + + proto._getClientDocument = function() { + return window.application.getClientWindow().getClientDocument(); + }; + + + *************** *** 339,345 **** // Activate capture for clientDocument ! var clientDocument = window.application.getClientWindow().getClientDocument(); ! ! clientDocument.setCapture(true); }; }; --- 351,355 ---- // Activate capture for clientDocument ! this._getClientDocument().setCapture(true); }; }; *************** *** 510,513 **** --- 520,526 ---- }; + // Deactivate capture for clientDocument + this._getClientDocument().setCapture(false); + // Cleanup data and actions this.clearData(); *************** *** 567,571 **** if (!vNewCursor._initialLayoutDone) { ! window.application.getClientWindow().getClientDocument().add(vNewCursor); QxWidget.flushGlobalQueues(); }; --- 580,584 ---- if (!vNewCursor._initialLayoutDone) { ! this._getClientDocument().add(vNewCursor); QxWidget.flushGlobalQueues(); }; |
|
From: Andreas E. <ec...@us...> - 2006-01-18 18:37:31
|
Update of /cvsroot/qooxdoo/qooxdoo/source/test/user In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28910/source/test/user Modified Files: Tag: renderer Transport_1.html Log Message: Added warning. Index: Transport_1.html =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/test/user/Attic/Transport_1.html,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** Transport_1.html 18 Jan 2006 14:56:44 -0000 1.1.2.2 --- Transport_1.html 18 Jan 2006 18:37:18 -0000 1.1.2.3 *************** *** 20,24 **** <div id="testDescription"> ! <p>Testing new qooxdoo transport API.</p> </div> --- 20,24 ---- <div id="testDescription"> ! <p>Testing new qooxdoo transport API.<br/>STILL UNDER DEVELOPMENT!</p> </div> |
|
From: Andreas E. <ec...@us...> - 2006-01-18 18:36:51
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/transport In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28680/source/script/transport Modified Files: Tag: renderer QxRequest.js Log Message: Renamed properties Index: QxRequest.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/transport/Attic/QxRequest.js,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** QxRequest.js 18 Jan 2006 14:56:44 -0000 1.1.2.2 --- QxRequest.js 18 Jan 2006 18:36:40 -0000 1.1.2.3 *************** *** 48,55 **** QxRequest.addProperty({ name : "url", type : QxConst.TYPEOF_STRING }); - QxRequest.addProperty({ name : "content", type : QxConst.TYPEOF_OBJECT }); - QxRequest.addProperty({ name : "method", type : QxConst.TYPEOF_STRING, possibleValues : [ "GET", "POST", "PUT", "HEAD", "DELETE" ] }); ! QxRequest.addProperty({ name : "synchronous", type : QxConst.TYPEOF_BOOLEAN, defaultValue : false }); QxRequest.addProperty({ name : "username", type : QxConst.TYPEOF_STRING }); QxRequest.addProperty({ name : "password", type : QxConst.TYPEOF_STRING }); --- 48,54 ---- QxRequest.addProperty({ name : "url", type : QxConst.TYPEOF_STRING }); QxRequest.addProperty({ name : "method", type : QxConst.TYPEOF_STRING, possibleValues : [ "GET", "POST", "PUT", "HEAD", "DELETE" ] }); ! QxRequest.addProperty({ name : "asynchronous", type : QxConst.TYPEOF_BOOLEAN, defaultValue : true }); ! QxRequest.addProperty({ name : "data", type : QxConst.TYPEOF_OBJECT }); QxRequest.addProperty({ name : "username", type : QxConst.TYPEOF_STRING }); QxRequest.addProperty({ name : "password", type : QxConst.TYPEOF_STRING }); |
|
From: Andreas E. <ec...@us...> - 2006-01-18 18:33:02
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/transport In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27364/source/script/transport Modified Files: Tag: renderer QxXmlHttpTransport.js Log Message: Renaming of properties, etc. Index: QxXmlHttpTransport.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/transport/Attic/QxXmlHttpTransport.js,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** QxXmlHttpTransport.js 18 Jan 2006 14:56:44 -0000 1.1.2.2 --- QxXmlHttpTransport.js 18 Jan 2006 18:32:53 -0000 1.1.2.3 *************** *** 42,46 **** // basic registration to QxTransport // the real availability check (activeX stuff and so on) follows at the first real request ! QxTransportTypes.register(QxXmlHttpTransport, "QxXmlHttpTransport"); --- 42,46 ---- // basic registration to QxTransport // the real availability check (activeX stuff and so on) follows at the first real request ! QxTransport.registerType(QxXmlHttpTransport, "QxXmlHttpTransport"); *************** *** 115,118 **** --- 115,123 ---- */ + /*! + Target url to issue the request to + */ + QxXmlHttpTransport.addProperty({name : "url", type: QxConst.TYPEOF_STRING }); + /*! Determines what type of request to issue *************** *** 123,142 **** Set the request to asynchronous */ ! QxXmlHttpTransport.addProperty({name : "synchronous", type : QxConst.TYPEOF_BOOLEAN, defaultValue: false }); ! ! /*! ! Set the payload to be sent via this request ! */ ! QxXmlHttpTransport.addProperty({name : "payload", type : QxConst.TYPEOF_STRING }); ! ! /*! ! Gives the size of the response ! */ ! QxXmlHttpTransport.addProperty({name : "size", type: QxConst.TYPEOF_NUMBER, defaultValue : -1 }); /*! ! URL to issue the request to */ ! QxXmlHttpTransport.addProperty({name : "target", type: QxConst.TYPEOF_STRING }); /*! --- 128,137 ---- Set the request to asynchronous */ ! QxXmlHttpTransport.addProperty({name : "asynchronous", type : QxConst.TYPEOF_BOOLEAN, defaultValue: true }); /*! ! Set the data to be sent via this request */ ! QxXmlHttpTransport.addProperty({name : "data", type : QxConst.TYPEOF_STRING }); /*! *************** *** 255,259 **** Provides an array of all response headers. */ ! proto.getResponseHeaders = function() { var vRequest = this.getRequest(); --- 250,254 ---- Provides an array of all response headers. */ ! proto.getAllResponseHeaders = function() { var vRequest = this.getRequest(); *************** *** 366,373 **** - - - - /* --------------------------------------------------------------------------- --- 361,364 ---- |
|
From: Andreas E. <ec...@us...> - 2006-01-18 18:32:22
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/transport In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27255/source/script/transport Modified Files: Tag: renderer QxTransport.js Log Message: Added property transfer to request, event listener, sending Index: QxTransport.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/transport/Attic/QxTransport.js,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** QxTransport.js 18 Jan 2006 14:56:44 -0000 1.1.2.2 --- QxTransport.js 18 Jan 2006 18:32:13 -0000 1.1.2.3 *************** *** 62,98 **** */ ! var QxTransportTypes = ! { ! order : [ "QxXmlHttpTransport", "QxFrameTransport" ], ! ready : false, ! available : {}, ! supported : {}, ! register : function(vClass, vId) { ! QxTransportTypes.available[vId] = vClass; ! }, ! init : function() { ! if (QxTransportTypes.ready) { ! return; ! }; ! ! for (var vId in QxTransportTypes.available) ! { ! vTransporter = QxTransportTypes.available[vId]; ! if (vTransporter.isSupported()) { ! QxTransportTypes.supported[vId] = vTransporter; ! }; }; ! QxTransportTypes.ready = true; ! if (QxUtil.isObjectEmpty(QxTransportTypes.supported)) { ! throw new Error("No supported transport types were found!"); ! }; ! } }; --- 62,96 ---- */ ! proto._typesOrder = [ "QxXmlHttpTransport", "QxIframeTransport" ]; ! proto._typesReady = false; ! ! proto._typesAvailable = {}; ! proto._typesSupported = {}; ! proto.registerType = function(vClass, vId) { ! this._typesAvailable[vId] = vClass; ! }; ! proto._typesInit = function() ! { ! if (this._typesReady) { ! return; ! }; ! ! for (var vId in this._typesAvailable) { ! vTransporter = this._typesAvailable[vId]; ! if (vTransporter.isSupported()) { ! this._typesSupported[vId] = vTransporter; }; + }; ! this._typesReady = true; ! if (QxUtil.isObjectEmpty(this._typesSupported)) { ! throw new Error("No supported transport types were found!"); ! }; }; *************** *** 112,130 **** proto.send = function(vRequest) { ! QxTransportTypes.init(); ! var vUsage = QxTransportTypes.order; ! var vAvailable = QxTransportTypes.available; var vTransport; for (var i=0, l=vUsage.length; i<l; i++) { ! vTransport = vAvailable[vUsage[i]]; ! if (vTransport) { try { ! new vTransport(vRequest); return true; } --- 110,141 ---- proto.send = function(vRequest) { ! this._typesInit(); ! var vUsage = this._typesOrder; ! var vAvailable = this._typesAvailable; ! var vTransportImpl; var vTransport; for (var i=0, l=vUsage.length; i<l; i++) { ! vTransportImpl = vAvailable[vUsage[i]]; ! if (vTransportImpl) { try { ! vTransport = new vTransportImpl(); ! ! vTransport.setUrl(vRequest.getUrl()); ! vTransport.setMethod(vRequest.getMethod()); ! vTransport.setAsynchronous(vRequest.getAsynchronous()); ! vTransport.setData(vRequest.getData()); ! vTransport.setUsername(vRequest.getUsername()); ! vTransport.setPassword(vRequest.getPassword()); ! ! vTransport.addEventListener("complete", this._oncomplete, this); ! ! vTransport.send(); ! return true; } |
|
From: Andreas E. <ec...@us...> - 2006-01-18 18:28:52
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/transport In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25435/source/script/transport Added Files: Tag: renderer QxIframeTransport.js Removed Files: Tag: renderer QxIFrameTransport.js Log Message: Changed file name from QxIFrameTransport.js to QxIframeTransport.js --- NEW FILE: QxIframeTransport.js --- /* ************************************************************************ qooxdoo - the new era of web interface development Version: $Id: QxIframeTransport.js,v 1.1.2.1 2006/01/18 18:28:37 ecker Exp $ Copyright: (C) 2004-2005 by Schlund + Partner AG, Germany All rights reserved License: LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/ Internet: * http://qooxdoo.oss.schlund.de Authors: * Sebastian Werner (wpbasti) <sebastian dot werner at 1und1 dot de> * Andreas Ecker (aecker) <andreas dot ecker at 1und1 dot de> ************************************************************************ */ /* ************************************************************************ #package(ajax) ************************************************************************ */ function QxIframeTransport() { QxTarget.call(this); }; QxIframeTransport.extend(QxTarget, "QxIframeTransport"); // basic registration to QxTransport // the real availability check (activeX stuff and so on) follows at the first real request QxTransport.registerType(QxIframeTransport, "QxIframeTransport"); QxIframeTransport.isSupported = function() { return false; }; /* --------------------------------------------------------------------------- CORE METHODS --------------------------------------------------------------------------- */ proto.send = function() { this.debug("Sending..."); }; --- QxIFrameTransport.js DELETED --- |
|
From: Sebastian W. <wp...@us...> - 2006-01-18 14:56:58
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/transport In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4096/source/script/transport Modified Files: Tag: renderer QxIFrameTransport.js QxRequest.js QxRequestQueue.js QxTransport.js QxXmlHttpTransport.js Log Message: Initial Rework, added better example Index: QxRequest.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/transport/Attic/QxRequest.js,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** QxRequest.js 18 Jan 2006 13:28:11 -0000 1.1.2.1 --- QxRequest.js 18 Jan 2006 14:56:44 -0000 1.1.2.2 *************** *** 80,91 **** */ ! proto.send = function() ! { ! }; ! proto.abort = function() ! { ! }; --- 80,89 ---- */ ! proto.send = function() { ! QxRequestQueue.add(this); }; ! proto.abort = function() { ! QxRequestQueue.abort(this); }; Index: QxIFrameTransport.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/transport/Attic/QxIFrameTransport.js,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** QxIFrameTransport.js 18 Jan 2006 13:28:10 -0000 1.1.2.1 --- QxIFrameTransport.js 18 Jan 2006 14:56:44 -0000 1.1.2.2 *************** *** 40,46 **** // basic registration to QxTransport // the real availability check (activeX stuff and so on) follows at the first real request ! QxTransport.registerType(QxIFrameTransport, "QxIFrameTransport"); QxIFrameTransport.isSupported = function() { return true; ! }; \ No newline at end of file --- 40,62 ---- // basic registration to QxTransport // the real availability check (activeX stuff and so on) follows at the first real request ! QxTransportTypes.register(QxIFrameTransport, "QxIFrameTransport"); QxIFrameTransport.isSupported = function() { return true; ! }; ! ! ! ! ! ! ! /* ! --------------------------------------------------------------------------- ! CORE METHODS ! --------------------------------------------------------------------------- ! */ ! ! proto.send = function() ! { ! this.debug("Sending..."); ! }; Index: QxTransport.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/transport/Attic/QxTransport.js,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** QxTransport.js 18 Jan 2006 13:28:11 -0000 1.1.2.1 --- QxTransport.js 18 Jan 2006 14:56:44 -0000 1.1.2.2 *************** *** 34,41 **** QxTarget.call(this); ! if (!QxTransport.TYPES_CHECKED) { ! QxTransport.checkTypes(); ! }; ! }; --- 34,38 ---- QxTarget.call(this); ! }; *************** *** 46,51 **** - - /* --------------------------------------------------------------------------- --- 43,46 ---- *************** *** 67,96 **** */ ! // Try to use xmlhttp first, iframes after this (add more if needed) ! QxTransport.DEFAULT_TYPE_ORDER = [ "QxXmlHttpTransport", "QxFrameTransport" ]; ! ! QxTransport.TYPES_CHECKED = false; ! QxTransport.AVAILABLE_TYPES = {}; ! QxTransport.SUPPORTED_TYPES = {}; ! QxTransport.registerType = function(vClass, vId) { ! QxTransport.AVAILABLE_TYPES[vId] = vClass; }; ! QxTransport.checkTypes = function() { ! for (var vId in QxTransport.AVAILABLE_TYPES) { ! vTransporter = QxTransport.AVAILABLE_TYPES[vId]; ! if (vTransporter.isSupported()) { ! QxTransport.SUPPORTED_TYPES[vId] = vTransporter; }; ! }; ! ! QxTransport.TYPES_CHECKED = true; ! if (QxUtil.isObjectEmpty(QxTransport.SUPPORTED_TYPES)) { ! throw new Error("No supported transport types were found!"); ! }; }; --- 62,154 ---- */ ! var QxTransportTypes = ! { ! order : [ "QxXmlHttpTransport", "QxFrameTransport" ], ! ready : false, ! available : {}, ! supported : {}, ! ! register : function(vClass, vId) { ! QxTransportTypes.available[vId] = vClass; ! }, ! ! init : function() ! { ! if (QxTransportTypes.ready) { ! return; ! }; ! ! for (var vId in QxTransportTypes.available) ! { ! vTransporter = QxTransportTypes.available[vId]; ! ! if (vTransporter.isSupported()) { ! QxTransportTypes.supported[vId] = vTransporter; ! }; ! }; ! ! QxTransportTypes.ready = true; ! ! if (QxUtil.isObjectEmpty(QxTransportTypes.supported)) { ! throw new Error("No supported transport types were found!"); ! }; ! } }; ! ! ! ! ! ! ! ! /* ! --------------------------------------------------------------------------- ! HANDLER ! --------------------------------------------------------------------------- ! */ ! ! proto.send = function(vRequest) { ! QxTransportTypes.init(); ! ! var vUsage = QxTransportTypes.order; ! var vAvailable = QxTransportTypes.available; ! var vTransport; ! ! for (var i=0, l=vUsage.length; i<l; i++) { ! vTransport = vAvailable[vUsage[i]]; ! if (vTransport) ! { ! try ! { ! new vTransport(vRequest); ! return true; ! } ! catch(ex) ! { ! return this.error("Request handler throws error: " + ex, "send"); ! }; }; ! }; ! this.error("No Request Type available for: " + vRequest, "handle"); }; + + + + + + + + + /* + --------------------------------------------------------------------------- + SINGLETON INSTANCE + --------------------------------------------------------------------------- + */ + + QxTransport = new QxTransport; Index: QxXmlHttpTransport.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/transport/Attic/QxXmlHttpTransport.js,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** QxXmlHttpTransport.js 18 Jan 2006 13:28:11 -0000 1.1.2.1 --- QxXmlHttpTransport.js 18 Jan 2006 14:56:44 -0000 1.1.2.2 *************** *** 30,38 **** ************************************************************************ */ ! function QxXmlHttpTransport() { QxTarget.call(this); ! this._req = QxXmlHttpTransport.CREATE_REQUEST(); }; --- 30,39 ---- ************************************************************************ */ ! function QxXmlHttpTransport(vRequest) { QxTarget.call(this); ! this._req = QxXmlHttpTransport.createRequestObject(); ! this.send(); }; *************** *** 41,45 **** // basic registration to QxTransport // the real availability check (activeX stuff and so on) follows at the first real request ! QxTransport.registerType(QxXmlHttpTransport, "QxXmlHttpTransport"); --- 42,46 ---- // basic registration to QxTransport // the real availability check (activeX stuff and so on) follows at the first real request ! QxTransportTypes.register(QxXmlHttpTransport, "QxXmlHttpTransport"); *************** *** 154,201 **** - - /* --------------------------------------------------------------------------- ! DATA --------------------------------------------------------------------------- */ ! // DISUSS: Why do we need both (wpbasti) ! ! /*! ! _requestTypes - Array of request types that are valid ! */ ! QxXmlHttpTransport._requestTypes = [ "GET", "POST", "HEAD" ]; ! ! /*! ! Symbolic constants for public use ! */ ! QxXmlHttpTransport.RequestTypes = { ! GET : "GET", ! POST : "POST", ! HEAD : "HEAD" }; ! ! ! ! ! ! ! ! ! ! /* ! --------------------------------------------------------------------------- ! METHODS ! --------------------------------------------------------------------------- ! */ ! ! /*! ! Check to ensure that only valid request methods are requested ! */ ! proto._checkRequestMethod = function(propValue, propData) { ! return QxXmlHttpTransport._requestTypes.contains(propValue); }; --- 155,171 ---- /* --------------------------------------------------------------------------- ! CORE METHODS --------------------------------------------------------------------------- */ ! proto.getRequest = function() { ! return this._req; }; ! proto.send = function() ! { ! this.debug("Sending..."); }; *************** *** 204,209 **** - - /* --------------------------------------------------------------------------- --- 174,177 ---- *************** *** 247,253 **** proto.removeRequestHeaders = function() { - // unneeded? - // delete this._requestHeaders; - this._requestHeaders = {}; return true; --- 215,218 ---- *************** *** 272,308 **** in Gecko. */ ! proto.getResponseHeader = function(headerName) { ! if (!this._req && !this._responseHeaders) ! { ! return null; ! } ! else if (!this._req && this._responseHeaders) { ! if (this._responseHeaders[headerName]) ! { ! return this._responseHeaders[headerName]; ! } ! else ! { return null; - }; - } - else if (this._req) - { - switch (this._req.readyState) - { - case 0: - case 1: - case 2: - return null; - - case 3: - case 4: - return this._req.getResponseHeader(headerName); - - default: - throw new Error("Unknown ready state reached!"); - }; }; }; --- 237,252 ---- in Gecko. */ ! proto.getResponseHeader = function(vName) { ! var vRequest = this.getRequest(); ! ! switch (vRequest.readyState) { ! case 3: ! case 4: ! return vRequest.getResponseHeader(vName); ! ! default: return null; }; }; *************** *** 313,340 **** proto.getResponseHeaders = function() { ! if (!this._req && !this._responseHeaders) ! { ! return null; ! } ! else if (!this._req && this._responseHeaders) ! { ! return this._responseHeaders; ! } ! else if (this._req) { ! switch (this._req.readyState) ! { ! case 0: ! case 1: ! case 2: ! return null; ! ! case 3: ! case 4: ! return this._req.getAllResponseHeaders(); ! default: ! throw new Error("Unknown ready state reached!"); ! }; }; }; --- 257,270 ---- proto.getResponseHeaders = function() { ! var vRequest = this.getRequest(); ! ! switch (vRequest.readyState) { ! case 3: ! case 4: ! return vRequest.getAllResponseHeaders(); ! default: ! return null; }; }; *************** *** 359,389 **** proto.getStatusCode = function() { ! if (!this._req) ! { ! return this._status; ! } ! else { ! switch (this._req.readyState) ! { ! case 0: ! case 1: ! return -1; ! break; ! ! case 2: ! if (QxHttpTransport._requestCtor == QxHttpTransport._activeXRequest) { ! return -1; ! } ! // no break here? ! ! case 3: ! case 4: ! return this._req.status; ! break; ! }; }; }; ! /*! Provides the status text for the current request if available and null otherwise. --- 289,306 ---- proto.getStatusCode = function() { ! var vRequest = this.getRequest(); ! ! switch (vRequest.readyState) { ! case 2: ! case 3: ! case 4: ! return vRequest.status || -1; ! ! default: ! return -1; }; }; ! /*! Provides the status text for the current request if available and null otherwise. *************** *** 391,397 **** proto.getStatusText = function() { if (this.getStatusCode() != -1) { ! return this._req ? this._req.statusText : this._statusText; } else --- 308,316 ---- proto.getStatusText = function() { + var vRequest = this.getRequest(); + if (this.getStatusCode() != -1) { ! return vRequest.statusText || null; } else *************** *** 405,409 **** */ proto.getReadyState = function() { ! return this._req == null ? -1 : this._req.readyState; }; --- 324,328 ---- */ proto.getReadyState = function() { ! return this.getRequest().readyState; }; *************** *** 413,429 **** be made available to the caller. */ ! proto.getResponseText = function(partial) { ! var minState = 4; ! ! if (!this._req && this._responseText) { ! return this._responseText; ! }; ! ! if (partial || partial == true) { ! minState = 3; }; ! return minState <= this.getReadyState() ? this._req.responseText : null; }; --- 332,342 ---- be made available to the caller. */ ! proto.getResponseText = function(vPartial) { ! if ((vPartial ? 3 : 4) <= this.getReadyState()) { ! return this.getRequest().responseText || null; }; ! return null; }; *************** *** 433,449 **** be made available to the caller. */ ! proto.getResponseXML = function(partial) { ! var minState = 4; ! ! if (!this._req && this._responseXML) { ! return this._responseXML; ! }; ! ! if (partial || partial == true) { ! minState = 3; }; ! return minState <= this.getReadyState() ? this._req.responseXML : null; }; --- 346,356 ---- be made available to the caller. */ ! proto.getResponseXML = function(vPartial) { ! if ((vPartial ? 3 : 4) <= this.getReadyState()) { ! return this.getRequest().responseXML || null; }; ! return null; }; *************** *** 453,466 **** proto.getFetchedLength = function() { ! // Internet Explorer throws an exception here unless readyState = 4 for some odd reason ! // DISCUSS: Is this really true (wpbasti)? ! if (!this._req || QxClient.isMshtml()) ! { ! return -1; ! } ! else ! { ! return this._req.responseText.length; ! }; }; --- 360,365 ---- proto.getFetchedLength = function() { ! var vText = this.getResponseText(true); ! return QxUtil.isValidString(vText) ? vText.length : 0; }; Index: QxRequestQueue.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/transport/Attic/QxRequestQueue.js,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** QxRequestQueue.js 18 Jan 2006 13:28:11 -0000 1.1.2.1 --- QxRequestQueue.js 18 Jan 2006 14:56:44 -0000 1.1.2.2 *************** *** 33,37 **** { QxTarget.call(this); ! }; --- 33,41 ---- { QxTarget.call(this); ! ! this._queue = []; ! ! this._timer = new QxTimer(50); ! this._timer.addEventListener("interval", this._oninterval, this); }; *************** *** 40,43 **** --- 44,48 ---- + /* --------------------------------------------------------------------------- *************** *** 48,49 **** --- 53,136 ---- QxRequestQueue.addProperty({ name : "maxTotalRequests", type : QxConst.TYPEOF_NUMBER }); QxRequestQueue.addProperty({ name : "maxConcurrentRequests", type : QxConst.TYPEOF_NUMBER, defaultValue : 3 }); + + + + + + + /* + --------------------------------------------------------------------------- + EVENT LISTENERS + --------------------------------------------------------------------------- + */ + + proto._oninterval = function() + { + // DISCUSS: How to support concurrent requests? + QxTransport.send(this._queue.shift()); + + if (this._queue.length === 0) { + this._timer.stop(); + }; + }; + + + + + + + /* + --------------------------------------------------------------------------- + METHODS + --------------------------------------------------------------------------- + */ + + proto.add = function(vRequest) + { + this._queue.push(vRequest); + this._timer.start(); + }; + + proto.abort = function(vRequest) + { + + }; + + + + + + /* + --------------------------------------------------------------------------- + DISPOSER + --------------------------------------------------------------------------- + */ + + proto.dispose = function() + { + if (this.getDisposed()) { + return true; + }; + + this._queue = null; + + if (this._timer) + { + this._timer.dispose(); + this._timer = null; + }; + + return QxTarget.prototype.dispose.call(this); + }; + + + + + + /* + --------------------------------------------------------------------------- + SINGLETON INSTANCE + --------------------------------------------------------------------------- + */ + + QxRequestQueue = new QxRequestQueue; |
|
From: Sebastian W. <wp...@us...> - 2006-01-18 14:56:58
|
Update of /cvsroot/qooxdoo/qooxdoo/source/test/user In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4096/source/test/user Modified Files: Tag: renderer Transport_1.html Log Message: Initial Rework, added better example Index: Transport_1.html =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/test/user/Attic/Transport_1.html,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** Transport_1.html 18 Jan 2006 13:45:56 -0000 1.1.2.1 --- Transport_1.html 18 Jan 2006 14:56:44 -0000 1.1.2.2 *************** *** 20,24 **** <div id="testDescription"> ! <p></p> </div> --- 20,24 ---- <div id="testDescription"> ! <p>Testing new qooxdoo transport API.</p> </div> *************** *** 28,36 **** var d = this.getClientWindow().getClientDocument(); ! var req = new QxRequest("url"); ! ! req.addEventListener( "complete", function(e) { alert(e.getNewValue().getTextContent()); } ); ! ! req.send(); }; </script> --- 28,95 ---- var d = this.getClientWindow().getClientDocument(); ! var lay = new QxVerticalBoxLayout; ! lay.setLocation(20, 48); ! lay.setRight(335); ! lay.setBottom(48); ! this.add(lay); ! ! ! ! var fsq = new QxFieldSet("Request"); ! fsq.setHeight("auto"); ! lay.add(fsq); ! ! ! var hlay = new QxHorizontalBoxLayout; ! hlay.setVerticalChildrenAlign("middle"); ! hlay.setSpacing(4); ! hlay.auto(); ! fsq.add(hlay); ! ! ! var cm1 = new QxComboBox(); ! cm1.add(new QxListItem("data/items/1.xml")); ! cm1.add(new QxListItem("data/items/2.xml")); ! ! hlay.add(cm1); ! ! ! var btn = new QxButton("Send", "icons/16/apply.png"); ! hlay.add(btn); ! ! ! ! var fsr = new QxFieldSet("Result"); ! fsr.setHeight("1*"); ! lay.add(fsr); ! ! var area = new QxTextArea; ! area.setDimension("100%", "100%"); ! fsr.add(area); ! ! ! ! ! ! ! ! btn.addEventListener("execute", function(e) ! { ! var val = cm1.getSelected(); ! ! if (!val) { ! return; ! }; ! ! var req = new QxRequest(val.getLabel()); ! ! req.addEventListener("complete", function(e) ! { ! this.debug("Data comes back"); ! //area.setValue(e.getNewValue().getTextContent()); ! }); ! ! req.send(); ! }); }; </script> |
|
From: Sebastian W. <wp...@us...> - 2006-01-18 13:46:06
|
Update of /cvsroot/qooxdoo/qooxdoo/source/test/user In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12844/source/test/user Added Files: Tag: renderer Transport_1.html Removed Files: Tag: renderer Binding_1.html Log Message: Renamed to transport --- NEW FILE: Transport_1.html --- <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de"> <head> <script type="text/javascript">window._htmlstart=(new Date).valueOf()</script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" /> <meta http-equiv="MsThemeCompatible" content="yes" /> <meta http-equiv="ImageToolBar" content="no" /> <meta name="MSSmartTagsPreventParsing" content="yes" /> <title>qooxdoo demo dev</title> <link type="text/css" rel="stylesheet" href="../../style/qooxdoo.css"/> <link type="text/css" rel="stylesheet" href="../../style/demolayout.css"/> <script type="text/javascript" src="../../../tools/script/includer.js"></script> </head> <body> <script type="text/javascript" src="../../../tools/script/demolayout.js"></script> <div id="testDescription"> <p></p> </div> <script type="text/javascript"> window.application.main = function() { var d = this.getClientWindow().getClientDocument(); var req = new QxRequest("url"); req.addEventListener( "complete", function(e) { alert(e.getNewValue().getTextContent()); } ); req.send(); }; </script> </body> </html> --- Binding_1.html DELETED --- |
|
From: Sebastian W. <wp...@us...> - 2006-01-18 13:29:40
|
Update of /cvsroot/qooxdoo/qooxdoo/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6919/tools Modified Files: Tag: renderer config.sh Log Message: Minor change Index: config.sh =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/tools/config.sh,v retrieving revision 1.16.2.95 retrieving revision 1.16.2.96 diff -C2 -d -r1.16.2.95 -r1.16.2.96 *** config.sh 18 Jan 2006 13:28:57 -0000 1.16.2.95 --- config.sh 18 Jan 2006 13:29:26 -0000 1.16.2.96 *************** *** 284,287 **** L="$L transport/QxTransport" - L="$L transport/QxFrameTransport" L="$L transport/QxXmlHttpTransport" --- 284,287 ---- L="$L transport/QxTransport" L="$L transport/QxXmlHttpTransport" + L="$L transport/QxIFrameTransport" |
|
From: Sebastian W. <wp...@us...> - 2006-01-18 13:29:06
|
Update of /cvsroot/qooxdoo/qooxdoo/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6648/tools Modified Files: Tag: renderer config.sh Log Message: Moved transport stuff to transport Index: config.sh =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/tools/config.sh,v retrieving revision 1.16.2.94 retrieving revision 1.16.2.95 diff -C2 -d -r1.16.2.94 -r1.16.2.95 *** config.sh 18 Jan 2006 10:38:18 -0000 1.16.2.94 --- config.sh 18 Jan 2006 13:28:57 -0000 1.16.2.95 *************** *** 102,106 **** L="$L core/QxXmlExtras" ! # Old Data Binding L="$L deprecated/QxXmlHttpLoader" L="$L deprecated/QxData" --- 102,106 ---- L="$L core/QxXmlExtras" ! # Old Data Transport L="$L deprecated/QxXmlHttpLoader" L="$L deprecated/QxData" *************** *** 274,287 **** L="$L core/QxTimeTracker" ! # Binding ! L="$L binding/QxRequest" ! L="$L binding/QxResponse" ! L="$L binding/QxGetRequest" ! L="$L binding/QxPostRequest" ! L="$L binding/QxRequestQueue" ! L="$L binding/QxTransport" ! L="$L binding/QxFrameTransport" ! L="$L binding/QxXmlHttpTransport" --- 274,287 ---- L="$L core/QxTimeTracker" ! # Transport ! L="$L transport/QxRequest" ! L="$L transport/QxResponse" ! L="$L transport/QxGetRequest" ! L="$L transport/QxPostRequest" ! L="$L transport/QxRequestQueue" ! L="$L transport/QxTransport" ! L="$L transport/QxFrameTransport" ! L="$L transport/QxXmlHttpTransport" |
|
From: Sebastian W. <wp...@us...> - 2006-01-18 13:28:38
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/transport In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6468/source/script/transport Added Files: Tag: renderer QxGetRequest.js QxIFrameTransport.js QxPostRequest.js QxRequest.js QxRequestQueue.js QxResponse.js QxTransport.js QxXmlHttpTransport.js Log Message: Moved transport stuff to transport --- NEW FILE: QxPostRequest.js --- /* ************************************************************************ qooxdoo - the new era of web interface development Version: $Id: QxPostRequest.js,v 1.1.2.1 2006/01/18 13:28:11 wpbasti Exp $ Copyright: (C) 2004-2005 by Schlund + Partner AG, Germany All rights reserved License: LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/ Internet: * http://qooxdoo.oss.schlund.de Authors: * Sebastian Werner (wpbasti) <sebastian dot werner at 1und1 dot de> * Andreas Ecker (aecker) <andreas dot ecker at 1und1 dot de> ************************************************************************ */ /* ************************************************************************ #package(ajax) ************************************************************************ */ function QxPostRequest(vUrl) { QxRequest.call(this, vUrl); this.setMethod("POST"); }; QxPostRequest.extend(QxRequest, "QxPostRequest"); --- NEW FILE: QxGetRequest.js --- /* ************************************************************************ qooxdoo - the new era of web interface development Version: $Id: QxGetRequest.js,v 1.1.2.1 2006/01/18 13:28:10 wpbasti Exp $ Copyright: (C) 2004-2005 by Schlund + Partner AG, Germany All rights reserved License: LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/ Internet: * http://qooxdoo.oss.schlund.de Authors: * Sebastian Werner (wpbasti) <sebastian dot werner at 1und1 dot de> * Andreas Ecker (aecker) <andreas dot ecker at 1und1 dot de> ************************************************************************ */ /* ************************************************************************ #package(ajax) ************************************************************************ */ function QxGetRequest(vUrl) { QxRequest.call(this, vUrl); this.setMethod("GET"); }; QxGetRequest.extend(QxRequest, "QxGetRequest"); --- NEW FILE: QxRequest.js --- /* ************************************************************************ qooxdoo - the new era of web interface development Version: $Id: QxRequest.js,v 1.1.2.1 2006/01/18 13:28:11 wpbasti Exp $ Copyright: (C) 2004-2005 by Schlund + Partner AG, Germany All rights reserved License: LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/ Internet: * http://qooxdoo.oss.schlund.de Authors: * Sebastian Werner (wpbasti) <sebastian dot werner at 1und1 dot de> * Andreas Ecker (aecker) <andreas dot ecker at 1und1 dot de> ************************************************************************ */ /* ************************************************************************ #package(ajax) ************************************************************************ */ function QxRequest(vUrl) { QxTarget.call(this); this.setUrl(vUrl); }; QxRequest.extend(QxTarget, "QxRequest"); /* --------------------------------------------------------------------------- PROPERTIES --------------------------------------------------------------------------- */ QxRequest.addProperty({ name : "url", type : QxConst.TYPEOF_STRING }); QxRequest.addProperty({ name : "content", type : QxConst.TYPEOF_OBJECT }); QxRequest.addProperty({ name : "method", type : QxConst.TYPEOF_STRING, possibleValues : [ "GET", "POST", "PUT", "HEAD", "DELETE" ] }); QxRequest.addProperty({ name : "synchronous", type : QxConst.TYPEOF_BOOLEAN, defaultValue : false }); QxRequest.addProperty({ name : "username", type : QxConst.TYPEOF_STRING }); QxRequest.addProperty({ name : "password", type : QxConst.TYPEOF_STRING }); QxRequest.addProperty({ name : "readyState", type : QxConst.TYPEOF_STRING, possibleValues : [ "prepared", "loading", "complete" ], defaultValue : "prepared" }); /* --------------------------------------------------------------------------- DATA --------------------------------------------------------------------------- */ QxRequest.READY_STATE_PREPARED = "prepared"; QxRequest.READY_STATE_LOADING = "loading"; QxRequest.READY_STATE_COMPLETE = "complete"; /* --------------------------------------------------------------------------- CORE METHODS --------------------------------------------------------------------------- */ proto.send = function() { }; proto.abort = function() { }; /* --------------------------------------------------------------------------- READY STATE ALIASES --------------------------------------------------------------------------- */ proto.isPrepared = function() { return this.getReadyState() === QxRequest.READY_STATE_PREPARED; }; proto.isLoading = function() { return this.getReadyState() === QxRequest.READY_STATE_LOADING; }; proto.isComplete = function() { return this.getReadyState() === QxRequest.READY_STATE_COMPLETE; }; /* --------------------------------------------------------------------------- MODIFIERS --------------------------------------------------------------------------- */ proto._modifyReadyState = function(propValue, propOldValue, propData) { switch(propValue) { case QxRequest.READY_STATE_PREPARED: // this should normally never be called break; case QxRequest.READY_STATE_LOADING: // support loading state informations (how to name the real transport event?) // startLoading vs. loading this.createDispatchEvent("loading"); break; case QxRequest.READY_STATE_COMPLETE: // send QxResponse instance through QxDataEvent? this.createDispatchDataEvent("complete"); break; }; return true; }; --- NEW FILE: QxTransport.js --- /* ************************************************************************ qooxdoo - the new era of web interface development Version: $Id: QxTransport.js,v 1.1.2.1 2006/01/18 13:28:11 wpbasti Exp $ Copyright: (C) 2004-2005 by Schlund + Partner AG, Germany All rights reserved License: LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/ Internet: * http://qooxdoo.oss.schlund.de Authors: * Sebastian Werner (wpbasti) <sebastian dot werner at 1und1 dot de> * Andreas Ecker (aecker) <andreas dot ecker at 1und1 dot de> ************************************************************************ */ /* ************************************************************************ #package(ajax) ************************************************************************ */ function QxTransport() { QxTarget.call(this); if (!QxTransport.TYPES_CHECKED) { QxTransport.checkTypes(); }; }; QxTransport.extend(QxTarget, "QxXmlHttpTransport"); /* --------------------------------------------------------------------------- PROPERTIES --------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------- TRANSPORT TYPE HANDLING --------------------------------------------------------------------------- */ // Try to use xmlhttp first, iframes after this (add more if needed) QxTransport.DEFAULT_TYPE_ORDER = [ "QxXmlHttpTransport", "QxFrameTransport" ]; QxTransport.TYPES_CHECKED = false; QxTransport.AVAILABLE_TYPES = {}; QxTransport.SUPPORTED_TYPES = {}; QxTransport.registerType = function(vClass, vId) { QxTransport.AVAILABLE_TYPES[vId] = vClass; }; QxTransport.checkTypes = function() { for (var vId in QxTransport.AVAILABLE_TYPES) { vTransporter = QxTransport.AVAILABLE_TYPES[vId]; if (vTransporter.isSupported()) { QxTransport.SUPPORTED_TYPES[vId] = vTransporter; }; }; QxTransport.TYPES_CHECKED = true; if (QxUtil.isObjectEmpty(QxTransport.SUPPORTED_TYPES)) { throw new Error("No supported transport types were found!"); }; }; --- NEW FILE: QxResponse.js --- /* ************************************************************************ qooxdoo - the new era of web interface development Version: $Id: QxResponse.js,v 1.1.2.1 2006/01/18 13:28:11 wpbasti Exp $ Copyright: (C) 2004-2005 by Schlund + Partner AG, Germany All rights reserved License: LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/ Internet: * http://qooxdoo.oss.schlund.de Authors: * Sebastian Werner (wpbasti) <sebastian dot werner at 1und1 dot de> * Andreas Ecker (aecker) <andreas dot ecker at 1und1 dot de> ************************************************************************ */ /* ************************************************************************ #package(ajax) ************************************************************************ */ function QxResponse() { QxTarget.call(this); }; QxResponse.extend(QxTarget, "QxResponse"); /* --------------------------------------------------------------------------- PROPERTIES --------------------------------------------------------------------------- */ QxResponse.addProperty({ name : "statusCode", type : QxConst.TYPEOF_NUMBER }); QxResponse.addProperty({ name : "statusMessage", type : QxConst.TYPEOF_STRING }); QxResponse.addProperty({ name : "textContent", type : QxConst.TYPEOF_STRING }); QxResponse.addProperty({ name : "xmlContent", type : QxConst.TYPEOF_STRING }); --- NEW FILE: QxRequestQueue.js --- /* ************************************************************************ qooxdoo - the new era of web interface development Version: $Id: QxRequestQueue.js,v 1.1.2.1 2006/01/18 13:28:11 wpbasti Exp $ Copyright: (C) 2004-2005 by Schlund + Partner AG, Germany All rights reserved License: LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/ Internet: * http://qooxdoo.oss.schlund.de Authors: * Sebastian Werner (wpbasti) <sebastian dot werner at 1und1 dot de> * Andreas Ecker (aecker) <andreas dot ecker at 1und1 dot de> ************************************************************************ */ /* ************************************************************************ #package(ajax) ************************************************************************ */ function QxRequestQueue() { QxTarget.call(this); }; QxRequestQueue.extend(QxTarget, "QxRequestQueue"); /* --------------------------------------------------------------------------- PROPERTIES --------------------------------------------------------------------------- */ QxRequestQueue.addProperty({ name : "maxTotalRequests", type : QxConst.TYPEOF_NUMBER }); QxRequestQueue.addProperty({ name : "maxConcurrentRequests", type : QxConst.TYPEOF_NUMBER, defaultValue : 3 }); --- NEW FILE: QxXmlHttpTransport.js --- /* ************************************************************************ qooxdoo - the new era of web interface development Version: $Id: QxXmlHttpTransport.js,v 1.1.2.1 2006/01/18 13:28:11 wpbasti Exp $ Copyright: (C) 2004-2005 by Schlund + Partner AG, Germany All rights reserved License: LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/ Internet: * http://qooxdoo.oss.schlund.de Authors: * Sebastian Werner (wpbasti) <sebastian dot werner at 1und1 dot de> * Andreas Ecker (aecker) <andreas dot ecker at 1und1 dot de> ************************************************************************ */ /* ************************************************************************ #package(ajax) ************************************************************************ */ function QxXmlHttpTransport() { QxTarget.call(this); this._req = QxXmlHttpTransport.CREATE_REQUEST(); }; QxXmlHttpTransport.extend(QxTarget, "QxXmlHttpTransport"); // basic registration to QxTransport // the real availability check (activeX stuff and so on) follows at the first real request QxTransport.registerType(QxXmlHttpTransport, "QxXmlHttpTransport"); /* --------------------------------------------------------------------------- GLOBAL METHOD DETECTION --------------------------------------------------------------------------- */ QxXmlHttpTransport.isSupported = function() { if (window.XMLHttpRequest) { QxXmlHttpTransport.createRequestObject = QxXmlHttpTransport.createNativeRequestObject; return true; }; if (window.ActiveXObject) { var vServers = [ "Microsoft.XMLHTTP", "MSXML.XMLHTTP", "MSXML2.XMLHTTP", "MSXML3.XMLHTTP", "MSXML4.XMLHTTP" ]; var vObject; for (var i=0, l=vServers.length; i<l; i++) { try { vObject = new ActiveXObject(servers[i]); break; } catch(ex) {}; }; if (vObject) { QxXmlHttpTransport.activeXServer = servers[i]; QxXmlHttpTransport.createRequestObject = QxXmlHttpTransport.createActiveXRequestObject; return true; }; }; return false; }; QxXmlHttpTransport.createRequestObject = function() { throw new Error("XMLHTTP is not supported!"); }; QxXmlHttpTransport.createNativeRequestObject = function() { return new XMLHttpRequest; }; QxXmlHttpTransport.createActiveXRequestObject = function() { return new ActiveXObject(QxXmlHttpTransport.activeXServer); }; /* --------------------------------------------------------------------------- PROPERTIES --------------------------------------------------------------------------- */ /*! Determines what type of request to issue */ QxXmlHttpTransport.addProperty({name : "method", type : QxConst.TYPEOF_STRING, defaultValue: "post" }); /*! Set the request to asynchronous */ QxXmlHttpTransport.addProperty({name : "synchronous", type : QxConst.TYPEOF_BOOLEAN, defaultValue: false }); /*! Set the payload to be sent via this request */ QxXmlHttpTransport.addProperty({name : "payload", type : QxConst.TYPEOF_STRING }); /*! Gives the size of the response */ QxXmlHttpTransport.addProperty({name : "size", type: QxConst.TYPEOF_NUMBER, defaultValue : -1 }); /*! URL to issue the request to */ QxXmlHttpTransport.addProperty({name : "target", type: QxConst.TYPEOF_STRING }); /*! Username to use for HTTP authentication */ QxXmlHttpTransport.addProperty({name : "username", type: QxConst.TYPEOF_STRING }); /*! Password to use for HTTP authentication */ QxXmlHttpTransport.addProperty({name : "password", type: QxConst.TYPEOF_STRING }); /* --------------------------------------------------------------------------- DATA --------------------------------------------------------------------------- */ // DISUSS: Why do we need both (wpbasti) /*! _requestTypes - Array of request types that are valid */ QxXmlHttpTransport._requestTypes = [ "GET", "POST", "HEAD" ]; /*! Symbolic constants for public use */ QxXmlHttpTransport.RequestTypes = { GET : "GET", POST : "POST", HEAD : "HEAD" }; /* --------------------------------------------------------------------------- METHODS --------------------------------------------------------------------------- */ /*! Check to ensure that only valid request methods are requested */ proto._checkRequestMethod = function(propValue, propData) { return QxXmlHttpTransport._requestTypes.contains(propValue); }; /* --------------------------------------------------------------------------- REQUEST HEADER SUPPORT --------------------------------------------------------------------------- */ /*! Adds a request header to the request */ proto.setRequestHeader = function(headerName, headerValue) { this._requestHeaders[headerName] = headerValue; }; /*! Returns the current value of the header with the provided name, and null if no such header is currently set. */ proto.getRequestHeader = function(headerName) { return this._requestHeaders[headerName] || null; }; /*! Provides an array of currently set request headers. */ proto.getRequestHeaders = function() { return this._requestHeaders; }; /*! Removes the request header of the given name from this request. Returns true in all cases. */ proto.removeRequestHeader = function(headerName) { delete this._requestHeaders[headerName]; return true; }; /*! Deletes all request headers from the current object. */ proto.removeRequestHeaders = function() { // unneeded? // delete this._requestHeaders; this._requestHeaders = {}; return true; }; /* --------------------------------------------------------------------------- RESPONSE HEADER SUPPORT --------------------------------------------------------------------------- */ /*! Returns a specific header provided by the server upon sending a request, with header name determined by the argument headerName. Only available at readyState 3 and 4 universally and in readyState 2 in Gecko. */ proto.getResponseHeader = function(headerName) { if (!this._req && !this._responseHeaders) { return null; } else if (!this._req && this._responseHeaders) { if (this._responseHeaders[headerName]) { return this._responseHeaders[headerName]; } else { return null; }; } else if (this._req) { switch (this._req.readyState) { case 0: case 1: case 2: return null; case 3: case 4: return this._req.getResponseHeader(headerName); default: throw new Error("Unknown ready state reached!"); }; }; }; /*! Provides an array of all response headers. */ proto.getResponseHeaders = function() { if (!this._req && !this._responseHeaders) { return null; } else if (!this._req && this._responseHeaders) { return this._responseHeaders; } else if (this._req) { switch (this._req.readyState) { case 0: case 1: case 2: return null; case 3: case 4: return this._req.getAllResponseHeaders(); default: throw new Error("Unknown ready state reached!"); }; }; }; /* --------------------------------------------------------------------------- STATUS SUPPORT --------------------------------------------------------------------------- */ /*! Returns the current status code of the request if available or -1 if not. */ proto.getStatusCode = function() { if (!this._req) { return this._status; } else { switch (this._req.readyState) { case 0: case 1: return -1; break; case 2: if (QxHttpTransport._requestCtor == QxHttpTransport._activeXRequest) { return -1; } // no break here? case 3: case 4: return this._req.status; break; }; }; }; /*! Provides the status text for the current request if available and null otherwise. */ proto.getStatusText = function() { if (this.getStatusCode() != -1) { return this._req ? this._req.statusText : this._statusText; } else { return null; }; }; /*! Provides the current readyState of the request if available, and -1 otherwise. */ proto.getReadyState = function() { return this._req == null ? -1 : this._req.readyState; }; /*! Provides the response text from the request when available and null otherwise. By passing true as the "partial" parameter of this method, incomplete data will be made available to the caller. */ proto.getResponseText = function(partial) { var minState = 4; if (!this._req && this._responseText) { return this._responseText; }; if (partial || partial == true) { minState = 3; }; return minState <= this.getReadyState() ? this._req.responseText : null; }; /*! Provides the XML provided by the response if any and null otherwise. By passing true as the "partial" parameter of this method, incomplete data will be made available to the caller. */ proto.getResponseXML = function(partial) { var minState = 4; if (!this._req && this._responseXML) { return this._responseXML; }; if (partial || partial == true) { minState = 3; }; return minState <= this.getReadyState() ? this._req.responseXML : null; }; /*! Returns the length of the content as fetched thus far */ proto.getFetchedLength = function() { // Internet Explorer throws an exception here unless readyState = 4 for some odd reason // DISCUSS: Is this really true (wpbasti)? if (!this._req || QxClient.isMshtml()) { return -1; } else { return this._req.responseText.length; }; }; /* --------------------------------------------------------------------------- DISPOSER --------------------------------------------------------------------------- */ proto.dispose = function() { if (this.getDisposed()) { return; }; this._req = null; return QxTarget.prototype.dispose.call(this); }; --- NEW FILE: QxIFrameTransport.js --- /* ************************************************************************ qooxdoo - the new era of web interface development Version: $Id: QxIFrameTransport.js,v 1.1.2.1 2006/01/18 13:28:10 wpbasti Exp $ Copyright: (C) 2004-2005 by Schlund + Partner AG, Germany All rights reserved License: LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/ Internet: * http://qooxdoo.oss.schlund.de Authors: * Sebastian Werner (wpbasti) <sebastian dot werner at 1und1 dot de> * Andreas Ecker (aecker) <andreas dot ecker at 1und1 dot de> ************************************************************************ */ /* ************************************************************************ #package(ajax) ************************************************************************ */ function QxIFrameTransport() { QxTarget.call(this); }; QxIFrameTransport.extend(QxTarget, "QxIFrameTransport"); // basic registration to QxTransport // the real availability check (activeX stuff and so on) follows at the first real request QxTransport.registerType(QxIFrameTransport, "QxIFrameTransport"); QxIFrameTransport.isSupported = function() { return true; }; |
|
From: Sebastian W. <wp...@us...> - 2006-01-18 13:27:55
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/transport In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6247/source/script/transport Log Message: Directory /cvsroot/qooxdoo/qooxdoo/source/script/transport added to the repository --> Using per-directory sticky tag `renderer' |
|
From: Sebastian W. <wp...@us...> - 2006-01-18 13:27:41
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/binding In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6192/source/script/binding Removed Files: Tag: renderer QxFrameTransport.js QxGetRequest.js QxPostRequest.js QxRequest.js QxRequestQueue.js QxResponse.js QxTransport.js QxXmlHttpTransport.js Log Message: Moved transport stuff to transport --- QxFrameTransport.js DELETED --- --- QxPostRequest.js DELETED --- --- QxGetRequest.js DELETED --- --- QxRequest.js DELETED --- --- QxTransport.js DELETED --- --- QxResponse.js DELETED --- --- QxRequestQueue.js DELETED --- --- QxXmlHttpTransport.js DELETED --- |
|
From: Andreas E. <ec...@us...> - 2006-01-18 13:25:36
|
Update of /cvsroot/qooxdoo/qooxdoo/source/test/user In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5607/source/test/user Modified Files: Tag: renderer Binding_1.html Log Message: pseudo code Index: Binding_1.html =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/test/user/Attic/Binding_1.html,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** Binding_1.html 18 Jan 2006 12:23:40 -0000 1.1.2.1 --- Binding_1.html 18 Jan 2006 13:25:24 -0000 1.1.2.2 *************** *** 28,33 **** var d = this.getClientWindow().getClientDocument(); ! var vTrans = new QxTransport; }; </script> --- 28,36 ---- var d = this.getClientWindow().getClientDocument(); ! var req = new QxRequest("url"); + req.addEventListener( "complete", function(e) { alert(e.getNewValue().getTextContent()); } ); + + req.send(); }; </script> |
|
From: Sebastian W. <wp...@us...> - 2006-01-18 12:23:51
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/binding In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15829/source/script/binding Modified Files: Tag: renderer QxFrameTransport.js QxTransport.js QxXmlHttpTransport.js Log Message: First updates to new AJAX layer Index: QxFrameTransport.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/binding/Attic/QxFrameTransport.js,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** QxFrameTransport.js 18 Jan 2006 10:38:18 -0000 1.1.2.1 --- QxFrameTransport.js 18 Jan 2006 12:23:40 -0000 1.1.2.2 *************** *** 41,42 **** --- 41,46 ---- // the real availability check (activeX stuff and so on) follows at the first real request QxTransport.registerType(QxFrameTransport, "QxFrameTransport"); + + QxFrameTransport.isSupported = function() { + return true; + }; \ No newline at end of file Index: QxTransport.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/binding/Attic/QxTransport.js,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** QxTransport.js 18 Jan 2006 10:38:18 -0000 1.1.2.1 --- QxTransport.js 18 Jan 2006 12:23:40 -0000 1.1.2.2 *************** *** 91,95 **** QxTransport.TYPES_CHECKED = true; ! if (QxTransport.SUPPORTED_TYPES) { throw new Error("No supported transport types were found!"); }; --- 91,95 ---- QxTransport.TYPES_CHECKED = true; ! if (QxUtil.isObjectEmpty(QxTransport.SUPPORTED_TYPES)) { throw new Error("No supported transport types were found!"); }; Index: QxXmlHttpTransport.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/binding/Attic/QxXmlHttpTransport.js,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** QxXmlHttpTransport.js 18 Jan 2006 10:38:18 -0000 1.1.2.1 --- QxXmlHttpTransport.js 18 Jan 2006 12:23:40 -0000 1.1.2.2 *************** *** 33,37 **** { QxTarget.call(this); ! }; --- 33,38 ---- { QxTarget.call(this); ! ! this._req = QxXmlHttpTransport.CREATE_REQUEST(); }; *************** *** 41,42 **** --- 42,489 ---- // the real availability check (activeX stuff and so on) follows at the first real request QxTransport.registerType(QxXmlHttpTransport, "QxXmlHttpTransport"); + + + + + + + /* + --------------------------------------------------------------------------- + GLOBAL METHOD DETECTION + --------------------------------------------------------------------------- + */ + + QxXmlHttpTransport.isSupported = function() + { + if (window.XMLHttpRequest) + { + QxXmlHttpTransport.createRequestObject = QxXmlHttpTransport.createNativeRequestObject; + return true; + }; + + if (window.ActiveXObject) + { + var vServers = [ "Microsoft.XMLHTTP", "MSXML.XMLHTTP", "MSXML2.XMLHTTP", "MSXML3.XMLHTTP", "MSXML4.XMLHTTP" ]; + var vObject; + + for (var i=0, l=vServers.length; i<l; i++) + { + try + { + vObject = new ActiveXObject(servers[i]); + break; + } + catch(ex) {}; + }; + + if (vObject) + { + QxXmlHttpTransport.activeXServer = servers[i]; + QxXmlHttpTransport.createRequestObject = QxXmlHttpTransport.createActiveXRequestObject; + + return true; + }; + }; + + return false; + }; + + QxXmlHttpTransport.createRequestObject = function() { + throw new Error("XMLHTTP is not supported!"); + }; + + + QxXmlHttpTransport.createNativeRequestObject = function() { + return new XMLHttpRequest; + }; + + QxXmlHttpTransport.createActiveXRequestObject = function() { + return new ActiveXObject(QxXmlHttpTransport.activeXServer); + }; + + + + + + + + /* + --------------------------------------------------------------------------- + PROPERTIES + --------------------------------------------------------------------------- + */ + + /*! + Determines what type of request to issue + */ + QxXmlHttpTransport.addProperty({name : "requestMethod", type : QxConst.TYPEOF_STRING, defaultValue: "post" }); + + /*! + Set the request to asynchronous + */ + QxXmlHttpTransport.addProperty({name : "async", type : QxConst.TYPEOF_BOOLEAN, defaultValue: true }); + + /*! + Set the payload to be sent via this request + */ + QxXmlHttpTransport.addProperty({name : "payload", type : QxConst.TYPEOF_STRING }); + + /*! + Gives the size of the response + FIXME - This property can be set publicly - definitely not what we want + */ + QxXmlHttpTransport.addProperty({name : "responseSize", type: QxConst.TYPEOF_NUMBER, defaultValue : -1 }); + + /*! + URL to issue the request to + */ + QxXmlHttpTransport.addProperty({name : "target", type: QxConst.TYPEOF_STRING }); + + /*! + Username to use for HTTP authentication + */ + QxXmlHttpTransport.addProperty({name : "username", type: QxConst.TYPEOF_STRING }); + + /*! + Password to use for HTTP authentication + */ + QxXmlHttpTransport.addProperty({name : "password", type: QxConst.TYPEOF_STRING }); + + + + + + + + + /* + --------------------------------------------------------------------------- + DATA + --------------------------------------------------------------------------- + */ + + // DISUSS: Why do we need both (wpbasti) + + /*! + _requestTypes - Array of request types that are valid + */ + QxXmlHttpTransport._requestTypes = [ "GET", "POST", "HEAD" ]; + + /*! + Symbolic constants for public use + */ + QxXmlHttpTransport.RequestTypes = { + GET : "GET", + POST : "POST", + HEAD : "HEAD" + }; + + + + + + + + + + + /* + --------------------------------------------------------------------------- + METHODS + --------------------------------------------------------------------------- + */ + + /*! + Check to ensure that only valid request methods are requested + */ + proto._checkRequestMethod = function(propValue, propData) { + return QxXmlHttpTransport._requestTypes.contains(propValue); + }; + + + + + + + + /* + --------------------------------------------------------------------------- + REQUEST HEADER SUPPORT + --------------------------------------------------------------------------- + */ + + /*! + Adds a request header to the request + */ + proto.setRequestHeader = function(headerName, headerValue) { + this._requestHeaders[headerName] = headerValue; + }; + + /*! + Returns the current value of the header with the provided name, and null if no such header is currently set. + */ + proto.getRequestHeader = function(headerName) { + return this._requestHeaders[headerName] || null; + }; + + /*! + Provides an array of currently set request headers. + */ + proto.getRequestHeaders = function() { + return this._requestHeaders; + }; + + /*! + Removes the request header of the given name from this request. Returns true in all cases. + */ + proto.removeRequestHeader = function(headerName) + { + delete this._requestHeaders[headerName]; + return true; + }; + + /*! + Deletes all request headers from the current object. + */ + proto.removeRequestHeaders = function() + { + // unneeded? + // delete this._requestHeaders; + + this._requestHeaders = {}; + return true; + }; + + + + + + + /* + --------------------------------------------------------------------------- + RESPONSE HEADER SUPPORT + --------------------------------------------------------------------------- + */ + + /*! + Returns a specific header provided by the server upon sending a request, + with header name determined by the argument headerName. + + Only available at readyState 3 and 4 universally and in readyState 2 + in Gecko. + */ + proto.getResponseHeader = function(headerName) + { + if (!this._req && !this._responseHeaders) + { + return null; + } + else if (!this._req && this._responseHeaders) + { + if (this._responseHeaders[headerName]) + { + return this._responseHeaders[headerName]; + } + else + { + return null; + }; + } + else if (this._req) + { + switch (this._req.readyState) + { + case 0: + case 1: + case 2: + return null; + + case 3: + case 4: + return this._req.getResponseHeader(headerName); + + default: + throw new Error("Unknown ready state reached!"); + }; + }; + }; + + /*! + Provides an array of all response headers. + */ + proto.getResponseHeaders = function() + { + if (!this._req && !this._responseHeaders) + { + return null; + } + else if (!this._req && this._responseHeaders) + { + return this._responseHeaders; + } + else if (this._req) + { + switch (this._req.readyState) + { + case 0: + case 1: + case 2: + return null; + + case 3: + case 4: + return this._req.getAllResponseHeaders(); + + default: + throw new Error("Unknown ready state reached!"); + }; + }; + }; + + + + + + + + + + /* + --------------------------------------------------------------------------- + STATUS SUPPORT + --------------------------------------------------------------------------- + */ + + /*! + Returns the current status code of the request if available or -1 if not. + */ + proto.getStatusCode = function() + { + if (!this._req) + { + return this._status; + } + else + { + switch (this._req.readyState) + { + case 0: + case 1: + return -1; + break; + + case 2: + if (QxHttpTransport._requestCtor == QxHttpTransport._activeXRequest) { + return -1; + } + // no break here? + + case 3: + case 4: + return this._req.status; + break; + }; + }; + }; + + /*! + Provides the status text for the current request if available and null otherwise. + */ + proto.getStatusText = function() + { + if (this.getStatusCode() != -1) + { + return this._req ? this._req.statusText : this._statusText; + } + else + { + return null; + }; + }; + + /*! + Provides the current readyState of the request if available, and -1 otherwise. + */ + proto.getReadyState = function() { + return this._req == null ? -1 : this._req.readyState; + }; + + /*! + Provides the response text from the request when available and null otherwise. + By passing true as the "partial" parameter of this method, incomplete data will + be made available to the caller. + */ + proto.getResponseText = function(partial) + { + var minState = 4; + + if (!this._req && this._responseText) { + return this._responseText; + }; + + if (partial || partial == true) { + minState = 3; + }; + + return minState <= this.getReadyState() ? this._req.responseText : null; + }; + + /*! + Provides the XML provided by the response if any and null otherwise. + By passing true as the "partial" parameter of this method, incomplete data will + be made available to the caller. + */ + proto.getResponseXML = function(partial) + { + var minState = 4; + + if (!this._req && this._responseXML) { + return this._responseXML; + }; + + if (partial || partial == true) { + minState = 3; + }; + + return minState <= this.getReadyState() ? this._req.responseXML : null; + }; + + /*! + Returns the length of the content as fetched thus far + */ + proto.getFetchedLength = function() + { + // Internet Explorer throws an exception here unless readyState = 4 for some odd reason + // DISCUSS: Is this really true (wpbasti)? + if (!this._req || QxClient.isMshtml()) + { + return -1; + } + else + { + return this._req.responseText.length; + }; + }; + + + + + + + + /* + --------------------------------------------------------------------------- + DISPOSER + --------------------------------------------------------------------------- + */ + + proto.dispose = function() + { + if (this.getDisposed()) { + return; + }; + + this._req = null; + + return QxTarget.prototype.dispose.call(this); + }; |
|
From: Sebastian W. <wp...@us...> - 2006-01-18 12:23:50
|
Update of /cvsroot/qooxdoo/qooxdoo/source/test/user In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15829/source/test/user Added Files: Tag: renderer Binding_1.html Log Message: First updates to new AJAX layer --- NEW FILE: Binding_1.html --- <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de"> <head> <script type="text/javascript">window._htmlstart=(new Date).valueOf()</script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" /> <meta http-equiv="MsThemeCompatible" content="yes" /> <meta http-equiv="ImageToolBar" content="no" /> <meta name="MSSmartTagsPreventParsing" content="yes" /> <title>qooxdoo demo dev</title> <link type="text/css" rel="stylesheet" href="../../style/qooxdoo.css"/> <link type="text/css" rel="stylesheet" href="../../style/demolayout.css"/> <script type="text/javascript" src="../../../tools/script/includer.js"></script> </head> <body> <script type="text/javascript" src="../../../tools/script/demolayout.js"></script> <div id="testDescription"> <p></p> </div> <script type="text/javascript"> window.application.main = function() { var d = this.getClientWindow().getClientDocument(); var vTrans = new QxTransport; }; </script> </body> </html> |
|
From: Sebastian W. <wp...@us...> - 2006-01-18 10:38:27
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/binding In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11335/source/script/binding Added Files: Tag: renderer QxFrameTransport.js QxGetRequest.js QxPostRequest.js QxRequest.js QxRequestQueue.js QxResponse.js QxTransport.js QxXmlHttpTransport.js Log Message: Added initial versions of new qooxdoo AJAX layer --- NEW FILE: QxFrameTransport.js --- /* ************************************************************************ qooxdoo - the new era of web interface development Version: $Id: QxFrameTransport.js,v 1.1.2.1 2006/01/18 10:38:18 wpbasti Exp $ Copyright: (C) 2004-2005 by Schlund + Partner AG, Germany All rights reserved License: LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/ Internet: * http://qooxdoo.oss.schlund.de Authors: * Sebastian Werner (wpbasti) <sebastian dot werner at 1und1 dot de> * Andreas Ecker (aecker) <andreas dot ecker at 1und1 dot de> ************************************************************************ */ /* ************************************************************************ #package(ajax) ************************************************************************ */ function QxFrameTransport() { QxTarget.call(this); }; QxFrameTransport.extend(QxTarget, "QxFrameTransport"); // basic registration to QxTransport // the real availability check (activeX stuff and so on) follows at the first real request QxTransport.registerType(QxFrameTransport, "QxFrameTransport"); --- NEW FILE: QxPostRequest.js --- /* ************************************************************************ qooxdoo - the new era of web interface development Version: $Id: QxPostRequest.js,v 1.1.2.1 2006/01/18 10:38:18 wpbasti Exp $ Copyright: (C) 2004-2005 by Schlund + Partner AG, Germany All rights reserved License: LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/ Internet: * http://qooxdoo.oss.schlund.de Authors: * Sebastian Werner (wpbasti) <sebastian dot werner at 1und1 dot de> * Andreas Ecker (aecker) <andreas dot ecker at 1und1 dot de> ************************************************************************ */ /* ************************************************************************ #package(ajax) ************************************************************************ */ function QxPostRequest(vUrl) { QxRequest.call(this, vUrl); this.setMethod("POST"); }; QxPostRequest.extend(QxRequest, "QxPostRequest"); --- NEW FILE: QxGetRequest.js --- /* ************************************************************************ qooxdoo - the new era of web interface development Version: $Id: QxGetRequest.js,v 1.1.2.1 2006/01/18 10:38:18 wpbasti Exp $ Copyright: (C) 2004-2005 by Schlund + Partner AG, Germany All rights reserved License: LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/ Internet: * http://qooxdoo.oss.schlund.de Authors: * Sebastian Werner (wpbasti) <sebastian dot werner at 1und1 dot de> * Andreas Ecker (aecker) <andreas dot ecker at 1und1 dot de> ************************************************************************ */ /* ************************************************************************ #package(ajax) ************************************************************************ */ function QxGetRequest(vUrl) { QxRequest.call(this, vUrl); this.setMethod("GET"); }; QxGetRequest.extend(QxRequest, "QxGetRequest"); --- NEW FILE: QxRequest.js --- /* ************************************************************************ qooxdoo - the new era of web interface development Version: $Id: QxRequest.js,v 1.1.2.1 2006/01/18 10:38:18 wpbasti Exp $ Copyright: (C) 2004-2005 by Schlund + Partner AG, Germany All rights reserved License: LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/ Internet: * http://qooxdoo.oss.schlund.de Authors: * Sebastian Werner (wpbasti) <sebastian dot werner at 1und1 dot de> * Andreas Ecker (aecker) <andreas dot ecker at 1und1 dot de> ************************************************************************ */ /* ************************************************************************ #package(ajax) ************************************************************************ */ function QxRequest(vUrl) { QxTarget.call(this); this.setUrl(vUrl); }; QxRequest.extend(QxTarget, "QxRequest"); /* --------------------------------------------------------------------------- PROPERTIES --------------------------------------------------------------------------- */ QxRequest.addProperty({ name : "url", type : QxConst.TYPEOF_STRING }); QxRequest.addProperty({ name : "content", type : QxConst.TYPEOF_OBJECT }); QxRequest.addProperty({ name : "method", type : QxConst.TYPEOF_STRING, possibleValues : [ "GET", "POST", "PUT", "HEAD", "DELETE" ] }); QxRequest.addProperty({ name : "synchronous", type : QxConst.TYPEOF_BOOLEAN, defaultValue : false }); QxRequest.addProperty({ name : "username", type : QxConst.TYPEOF_STRING }); QxRequest.addProperty({ name : "password", type : QxConst.TYPEOF_STRING }); QxRequest.addProperty({ name : "readyState", type : QxConst.TYPEOF_STRING, possibleValues : [ "prepared", "loading", "complete" ], defaultValue : "prepared" }); /* --------------------------------------------------------------------------- DATA --------------------------------------------------------------------------- */ QxRequest.READY_STATE_PREPARED = "prepared"; QxRequest.READY_STATE_LOADING = "loading"; QxRequest.READY_STATE_COMPLETE = "complete"; /* --------------------------------------------------------------------------- CORE METHODS --------------------------------------------------------------------------- */ proto.send = function() { }; proto.abort = function() { }; /* --------------------------------------------------------------------------- READY STATE ALIASES --------------------------------------------------------------------------- */ proto.isPrepared = function() { return this.getReadyState() === QxRequest.READY_STATE_PREPARED; }; proto.isLoading = function() { return this.getReadyState() === QxRequest.READY_STATE_LOADING; }; proto.isComplete = function() { return this.getReadyState() === QxRequest.READY_STATE_COMPLETE; }; /* --------------------------------------------------------------------------- MODIFIERS --------------------------------------------------------------------------- */ proto._modifyReadyState = function(propValue, propOldValue, propData) { switch(propValue) { case QxRequest.READY_STATE_PREPARED: // this should normally never be called break; case QxRequest.READY_STATE_LOADING: // support loading state informations (how to name the real transport event?) // startLoading vs. loading this.createDispatchEvent("loading"); break; case QxRequest.READY_STATE_COMPLETE: // send QxResponse instance through QxDataEvent? this.createDispatchDataEvent("complete"); break; }; return true; }; --- NEW FILE: QxTransport.js --- /* ************************************************************************ qooxdoo - the new era of web interface development Version: $Id: QxTransport.js,v 1.1.2.1 2006/01/18 10:38:18 wpbasti Exp $ Copyright: (C) 2004-2005 by Schlund + Partner AG, Germany All rights reserved License: LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/ Internet: * http://qooxdoo.oss.schlund.de Authors: * Sebastian Werner (wpbasti) <sebastian dot werner at 1und1 dot de> * Andreas Ecker (aecker) <andreas dot ecker at 1und1 dot de> ************************************************************************ */ /* ************************************************************************ #package(ajax) ************************************************************************ */ function QxTransport() { QxTarget.call(this); if (!QxTransport.TYPES_CHECKED) { QxTransport.checkTypes(); }; }; QxTransport.extend(QxTarget, "QxXmlHttpTransport"); /* --------------------------------------------------------------------------- PROPERTIES --------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------- TRANSPORT TYPE HANDLING --------------------------------------------------------------------------- */ // Try to use xmlhttp first, iframes after this (add more if needed) QxTransport.DEFAULT_TYPE_ORDER = [ "QxXmlHttpTransport", "QxFrameTransport" ]; QxTransport.TYPES_CHECKED = false; QxTransport.AVAILABLE_TYPES = {}; QxTransport.SUPPORTED_TYPES = {}; QxTransport.registerType = function(vClass, vId) { QxTransport.AVAILABLE_TYPES[vId] = vClass; }; QxTransport.checkTypes = function() { for (var vId in QxTransport.AVAILABLE_TYPES) { vTransporter = QxTransport.AVAILABLE_TYPES[vId]; if (vTransporter.isSupported()) { QxTransport.SUPPORTED_TYPES[vId] = vTransporter; }; }; QxTransport.TYPES_CHECKED = true; if (QxTransport.SUPPORTED_TYPES) { throw new Error("No supported transport types were found!"); }; }; --- NEW FILE: QxResponse.js --- /* ************************************************************************ qooxdoo - the new era of web interface development Version: $Id: QxResponse.js,v 1.1.2.1 2006/01/18 10:38:18 wpbasti Exp $ Copyright: (C) 2004-2005 by Schlund + Partner AG, Germany All rights reserved License: LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/ Internet: * http://qooxdoo.oss.schlund.de Authors: * Sebastian Werner (wpbasti) <sebastian dot werner at 1und1 dot de> * Andreas Ecker (aecker) <andreas dot ecker at 1und1 dot de> ************************************************************************ */ /* ************************************************************************ #package(ajax) ************************************************************************ */ function QxResponse() { QxTarget.call(this); }; QxResponse.extend(QxTarget, "QxResponse"); /* --------------------------------------------------------------------------- PROPERTIES --------------------------------------------------------------------------- */ QxResponse.addProperty({ name : "statusCode", type : QxConst.TYPEOF_NUMBER }); QxResponse.addProperty({ name : "statusMessage", type : QxConst.TYPEOF_STRING }); QxResponse.addProperty({ name : "textContent", type : QxConst.TYPEOF_STRING }); QxResponse.addProperty({ name : "xmlContent", type : QxConst.TYPEOF_STRING }); --- NEW FILE: QxRequestQueue.js --- /* ************************************************************************ qooxdoo - the new era of web interface development Version: $Id: QxRequestQueue.js,v 1.1.2.1 2006/01/18 10:38:18 wpbasti Exp $ Copyright: (C) 2004-2005 by Schlund + Partner AG, Germany All rights reserved License: LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/ Internet: * http://qooxdoo.oss.schlund.de Authors: * Sebastian Werner (wpbasti) <sebastian dot werner at 1und1 dot de> * Andreas Ecker (aecker) <andreas dot ecker at 1und1 dot de> ************************************************************************ */ /* ************************************************************************ #package(ajax) ************************************************************************ */ function QxRequestQueue() { QxTarget.call(this); }; QxRequestQueue.extend(QxTarget, "QxRequestQueue"); /* --------------------------------------------------------------------------- PROPERTIES --------------------------------------------------------------------------- */ QxRequestQueue.addProperty({ name : "maxTotalRequests", type : QxConst.TYPEOF_NUMBER }); QxRequestQueue.addProperty({ name : "maxConcurrentRequests", type : QxConst.TYPEOF_NUMBER, defaultValue : 3 }); --- NEW FILE: QxXmlHttpTransport.js --- /* ************************************************************************ qooxdoo - the new era of web interface development Version: $Id: QxXmlHttpTransport.js,v 1.1.2.1 2006/01/18 10:38:18 wpbasti Exp $ Copyright: (C) 2004-2005 by Schlund + Partner AG, Germany All rights reserved License: LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/ Internet: * http://qooxdoo.oss.schlund.de Authors: * Sebastian Werner (wpbasti) <sebastian dot werner at 1und1 dot de> * Andreas Ecker (aecker) <andreas dot ecker at 1und1 dot de> ************************************************************************ */ /* ************************************************************************ #package(ajax) ************************************************************************ */ function QxXmlHttpTransport() { QxTarget.call(this); }; QxXmlHttpTransport.extend(QxTarget, "QxXmlHttpTransport"); // basic registration to QxTransport // the real availability check (activeX stuff and so on) follows at the first real request QxTransport.registerType(QxXmlHttpTransport, "QxXmlHttpTransport"); |
|
From: Sebastian W. <wp...@us...> - 2006-01-18 10:38:27
|
Update of /cvsroot/qooxdoo/qooxdoo/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11335/tools Modified Files: Tag: renderer config.sh Log Message: Added initial versions of new qooxdoo AJAX layer Index: config.sh =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/tools/config.sh,v retrieving revision 1.16.2.93 retrieving revision 1.16.2.94 diff -C2 -d -r1.16.2.93 -r1.16.2.94 *** config.sh 16 Jan 2006 10:50:07 -0000 1.16.2.93 --- config.sh 18 Jan 2006 10:38:18 -0000 1.16.2.94 *************** *** 99,104 **** L="$L core/QxTimer" ! # Data Binding ! L="$L binding/QxXmlExtras" # Old Data Binding --- 99,104 ---- L="$L core/QxTimer" ! # XML Extras ! L="$L core/QxXmlExtras" # Old Data Binding *************** *** 273,274 **** --- 273,287 ---- # Debugging L="$L core/QxTimeTracker" + + # Binding + L="$L binding/QxRequest" + L="$L binding/QxResponse" + + L="$L binding/QxGetRequest" + L="$L binding/QxPostRequest" + + L="$L binding/QxRequestQueue" + L="$L binding/QxTransport" + + L="$L binding/QxFrameTransport" + L="$L binding/QxXmlHttpTransport" |
|
From: Sebastian W. <wp...@us...> - 2006-01-18 10:00:20
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30578/source/script/widgets Modified Files: Tag: renderer QxListViewHeader.js Log Message: Minor move Index: QxListViewHeader.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/widgets/Attic/QxListViewHeader.js,v retrieving revision 1.1.2.16 retrieving revision 1.1.2.17 diff -C2 -d -r1.1.2.16 -r1.1.2.17 *** QxListViewHeader.js 16 Jan 2006 16:11:57 -0000 1.1.2.16 --- QxListViewHeader.js 18 Jan 2006 10:00:12 -0000 1.1.2.17 *************** *** 33,36 **** --- 33,40 ---- { QxHorizontalBoxLayout.call(this); + + // This fixes the innerWidth calculation difference between the grid(pane) and the head. + this.setPaddingRight(QxWidget.SCROLLBAR_SIZE); + // ************************************************************************ |
|
From: Sebastian W. <wp...@us...> - 2006-01-18 10:00:19
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/appearance In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30578/source/script/appearance Modified Files: Tag: renderer QxAppearanceTheme-Default.js Log Message: Minor move Index: QxAppearanceTheme-Default.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/appearance/Attic/QxAppearanceTheme-Default.js,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -C2 -d -r1.1.2.7 -r1.1.2.8 *** QxAppearanceTheme-Default.js 18 Jan 2006 09:58:32 -0000 1.1.2.7 --- QxAppearanceTheme-Default.js 18 Jan 2006 10:00:11 -0000 1.1.2.8 *************** *** 1392,1399 **** overflow: QxConst.OVERFLOW_VALUE_HIDDEN, border : this.border, ! backgroundColor : this.bgcolor, ! ! // This fixes the innerWidth calculation difference between the grid(pane) and the head. ! paddingRight : QxWidget.SCROLLBAR_SIZE }; } --- 1392,1396 ---- overflow: QxConst.OVERFLOW_VALUE_HIDDEN, border : this.border, ! backgroundColor : this.bgcolor }; } |
|
From: Sebastian W. <wp...@us...> - 2006-01-18 09:58:40
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/appearance In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29872/source/script/appearance Modified Files: Tag: renderer QxAppearanceTheme-Default.js Log Message: Minor fix Index: QxAppearanceTheme-Default.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/appearance/Attic/QxAppearanceTheme-Default.js,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -C2 -d -r1.1.2.6 -r1.1.2.7 *** QxAppearanceTheme-Default.js 16 Jan 2006 16:11:54 -0000 1.1.2.6 --- QxAppearanceTheme-Default.js 18 Jan 2006 09:58:32 -0000 1.1.2.7 *************** *** 1228,1232 **** marginLeft : 3, height : 15, ! padding : 2, allowStretchY : false }; --- 1228,1235 ---- marginLeft : 3, height : 15, ! paddingTop : 2, ! paddingRight : 2, ! paddingBottom : 2, ! paddingLeft : 2, allowStretchY : false }; |
|
From: Sebastian W. <wp...@us...> - 2006-01-18 09:44:04
|
Update of /cvsroot/qooxdoo/qooxdoo/source/script/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24993/source/script/core Modified Files: Tag: renderer QxUtil.js Log Message: Minor bugfix Index: QxUtil.js =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/source/script/core/Attic/QxUtil.js,v retrieving revision 1.1.2.13 retrieving revision 1.1.2.14 diff -C2 -d -r1.1.2.13 -r1.1.2.14 *** QxUtil.js 17 Jan 2006 13:47:11 -0000 1.1.2.13 --- QxUtil.js 18 Jan 2006 09:43:56 -0000 1.1.2.14 *************** *** 120,124 **** QxUtil.convertObjectKeysToString = function(h) { ! return QxUtil.convertObjectToArray(h).join(", "); }; --- 120,124 ---- QxUtil.convertObjectKeysToString = function(h) { ! return QxUtil.convertObjectKeysToArray(h).join(", "); }; |