You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(204) |
Dec
(147) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(52) |
Feb
(33) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Dion O. <dol...@us...> - 2005-12-02 13:12:50
|
Update of /cvsroot/magicajax/magicajax/Core/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13526/magicajax/Core/script Modified Files: Tag: STABLE AjaxCallObject.js Log Message: Fix that sets the 'EnableClientScript' property of all validators inside a AjaxPanel to 'false' for NoStore mode. This solves the clientside validation script errors. + Fix for the clientside WaitElement. Now works for IE5.5, IE6 and FireFox. Index: AjaxCallObject.js =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/script/AjaxCallObject.js,v retrieving revision 1.27.2.1 retrieving revision 1.27.2.2 diff -C2 -d -r1.27.2.1 -r1.27.2.2 *** AjaxCallObject.js 1 Dec 2005 00:30:07 -0000 1.27.2.1 --- AjaxCallObject.js 2 Dec 2005 13:12:41 -0000 1.27.2.2 *************** *** 650,678 **** // wait element CreateWaitElement(); ! if (window.addEventListener) ! { ! window.addEventListener('onscroll', MoveWaitElement, false); ! window.addEventListener('onresize', MoveWaitElement, false); } ! else if (window.attachEvent) ! { window.attachEvent('onscroll', MoveWaitElement); window.attachEvent('onresize', MoveWaitElement); } var waitElement; ! function MoveWaitElement() ! { if (!waitElement) CreateWaitElement(); ! ! var width = document.body.clientWidth; ! waitElement.style.top = document.body.scrollTop; ! waitElement.style.left = width + document.body.offsetLeft - waitElement.offsetWidth; } ! function CreateWaitElement() ! { var elem = document.getElementById('__AjaxCall_Wait'); ! if (!elem) ! { elem = document.createElement("div"); elem.id = '__AjaxCall_Wait'; --- 650,690 ---- // wait element CreateWaitElement(); ! if (window.addEventListener) { ! window.addEventListener('scroll', MoveWaitElement, false); ! window.addEventListener('resize', MoveWaitElement, false); } ! else if (window.attachEvent) { window.attachEvent('onscroll', MoveWaitElement); window.attachEvent('onresize', MoveWaitElement); } var waitElement; ! var scrollX, scrollY = -1; ! function MoveWaitElement() { ! var scrollYT, scrollXT; if (!waitElement) CreateWaitElement(); ! if (typeof(window.pageYOffset) == "number") { ! scrollYT = window.pageYOffset; ! scrollXT = window.pageXOffset; ! } ! else if (document.body && document.documentElement && document.documentElement.scrollTop) { ! scrollYT = document.documentElement.scrollTop; ! scrollXT = document.body.scrollLeft; ! } ! else if (document.body && typeof(document.body.scrollTop) == "number") { ! scrollYT = document.body.scrollTop; ! scrollXT = document.body.scrollLeft; ! } ! if (scrollX != scrollXT || scrollY != scrollYT) { ! scrollX = scrollXT; ! scrollY = scrollYT; ! var width = document.body.clientWidth; ! waitElement.style.top = scrollYT + "px"; ! waitElement.style.right = -scrollXT + "px"; ! } } ! function CreateWaitElement() { var elem = document.getElementById('__AjaxCall_Wait'); ! if (!elem) { elem = document.createElement("div"); elem.id = '__AjaxCall_Wait'; |
From: Dion O. <dol...@us...> - 2005-12-02 09:58:13
|
Update of /cvsroot/magicajax/magicajax/Core/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6299/magicajax/Core/script Modified Files: AjaxCallObject.js Log Message: Fix for the clientside WaitElement. Now works for IE5.5, IE6 and FireFox. Index: AjaxCallObject.js =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/script/AjaxCallObject.js,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** AjaxCallObject.js 29 Nov 2005 01:08:36 -0000 1.27 --- AjaxCallObject.js 2 Dec 2005 09:58:04 -0000 1.28 *************** *** 650,678 **** // wait element CreateWaitElement(); ! if (window.addEventListener) ! { ! window.addEventListener('onscroll', MoveWaitElement, false); ! window.addEventListener('onresize', MoveWaitElement, false); } ! else if (window.attachEvent) ! { window.attachEvent('onscroll', MoveWaitElement); window.attachEvent('onresize', MoveWaitElement); } var waitElement; ! function MoveWaitElement() ! { if (!waitElement) CreateWaitElement(); ! ! var width = document.body.clientWidth; ! waitElement.style.top = document.body.scrollTop; ! waitElement.style.left = width + document.body.offsetLeft - waitElement.offsetWidth; } ! function CreateWaitElement() ! { var elem = document.getElementById('__AjaxCall_Wait'); ! if (!elem) ! { elem = document.createElement("div"); elem.id = '__AjaxCall_Wait'; --- 650,690 ---- // wait element CreateWaitElement(); ! if (window.addEventListener) { ! window.addEventListener('scroll', MoveWaitElement, false); ! window.addEventListener('resize', MoveWaitElement, false); } ! else if (window.attachEvent) { window.attachEvent('onscroll', MoveWaitElement); window.attachEvent('onresize', MoveWaitElement); } var waitElement; ! var scrollX, scrollY = -1; ! function MoveWaitElement() { ! var scrollYT, scrollXT; if (!waitElement) CreateWaitElement(); ! if (typeof(window.pageYOffset) == "number") { ! scrollYT = window.pageYOffset; ! scrollXT = window.pageXOffset; ! } ! else if (document.body && document.documentElement && document.documentElement.scrollTop) { ! scrollYT = document.documentElement.scrollTop; ! scrollXT = document.body.scrollLeft; ! } ! else if (document.body && typeof(document.body.scrollTop) == "number") { ! scrollYT = document.body.scrollTop; ! scrollXT = document.body.scrollLeft; ! } ! if (scrollX != scrollXT || scrollY != scrollYT) { ! scrollX = scrollXT; ! scrollY = scrollYT; ! var width = document.body.clientWidth; ! waitElement.style.top = scrollYT + "px"; ! waitElement.style.right = -scrollXT + "px"; ! } } ! function CreateWaitElement() { var elem = document.getElementById('__AjaxCall_Wait'); ! if (!elem) { elem = document.createElement("div"); elem.id = '__AjaxCall_Wait'; |
From: Dion O. <dol...@us...> - 2005-12-02 08:25:18
|
Update of /cvsroot/magicajax/magicajax/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22237/magicajax/Core Modified Files: MagicAjaxModule.cs PageFilter.cs Util.cs Log Message: Fix that sets the 'EnableClientScript' property of all validators inside a AjaxPanel to 'false' for NoStore mode. This solves the clientside validation script errors. Index: PageFilter.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/PageFilter.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PageFilter.cs 2 Dec 2005 00:07:27 -0000 1.3 --- PageFilter.cs 2 Dec 2005 08:25:10 -0000 1.4 *************** *** 41,65 **** return html.Substring(si, ei - si); } - - /// <summary> - /// Returns the javascript declaration of the 'Page_Validators' array in the output Html - /// </summary> - /// <returns></returns> - public string GetPageValidatorsArray() - { - string search = "Page_Validators = new Array("; - string clearValidatorArray = "Page_Validators = new Array();"; - - string html = GetHtmlPage(); - int si = html.IndexOf(search); - if (si == -1) - return clearValidatorArray; - - int ei = html.IndexOf(");", si); - if (ei == -1) - return clearValidatorArray; - - return html.Substring(si, ei - si + 2); - } #if NET_2_0 --- 41,44 ---- Index: Util.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/Util.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Util.cs 25 Nov 2005 20:45:47 -0000 1.11 --- Util.cs 2 Dec 2005 08:25:10 -0000 1.12 *************** *** 123,131 **** for (int i=0; i < parentControl.Controls.Count; i++) { ! Control con = parentControl.Controls[i]; ! if (onlyVisible && !con.Visible) continue; ! if ( type.IsInstanceOfType(con) ) list.Add (con); --- 123,131 ---- for (int i=0; i < parentControl.Controls.Count; i++) { ! Control con = parentControl.Controls[i]; ! if (onlyVisible && !con.Visible) continue; ! if ( type.IsInstanceOfType(con) ) list.Add (con); Index: MagicAjaxModule.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxModule.cs,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** MagicAjaxModule.cs 2 Dec 2005 00:07:27 -0000 1.37 --- MagicAjaxModule.cs 2 Dec 2005 08:25:10 -0000 1.38 *************** *** 509,520 **** AjaxCallHelper.WriteSetFieldScript("__VIEWSTATE", vsValue); } - - // Reset the javascript 'Page_Validators' array on each callback - // Note: this is a temporary solution until we find a better one - string pageValidatorsArray = _filter.GetPageValidatorsArray(); - if (pageValidatorsArray != null) - { - AjaxCallHelper.Write(pageValidatorsArray); - } #if NET_2_0 --- 509,512 ---- |
From: Dion O. <dol...@us...> - 2005-12-02 08:25:18
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Controls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22237/magicajax/Core/UI/Controls Modified Files: AjaxPanel.cs Log Message: Fix that sets the 'EnableClientScript' property of all validators inside a AjaxPanel to 'false' for NoStore mode. This solves the clientside validation script errors. Index: AjaxPanel.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxPanel.cs,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** AjaxPanel.cs 30 Nov 2005 12:22:29 -0000 1.26 --- AjaxPanel.cs 2 Dec 2005 08:25:10 -0000 1.27 *************** *** 242,245 **** --- 242,251 ---- Page.RegisterHiddenField (ControlCollectionState.GetControlFingerprintsField(this.ClientID), String.Empty); } + + if (IsPageNoStoreMode) + { + //disabling clientside validation inside AjaxPanels (not yet handled correctly) + DisableClientValidators(); + } } #endregion *************** *** 750,754 **** #endregion ! #region InitValidators /// <summary> /// Clears 'display' and 'visibility' styles from all the validators. --- 756,760 ---- #endregion ! #region Validator methods /// <summary> /// Clears 'display' and 'visibility' styles from all the validators. *************** *** 756,769 **** private void InitValidators() { ! ArrayList valids = Util.GetChildControlsOfType(this, typeof(BaseValidator), true); ! foreach (BaseValidator valid in valids) { ! valid.Style.Remove("display"); ! valid.Style.Remove("visibility"); } } #endregion #region FindTopPanelChildOfControl /// <summary> --- 762,785 ---- private void InitValidators() { ! ArrayList validators = Util.GetChildControlsOfType(this, typeof(BaseValidator), true); ! foreach (BaseValidator validator in validators) { ! validator.Style.Remove("display"); ! validator.Style.Remove("visibility"); } } + + private void DisableClientValidators() + { + ArrayList validators = Util.GetChildControlsOfType(this, typeof(BaseValidator), true); + foreach (BaseValidator validator in validators) + { + validator.EnableClientScript = false; + } + } #endregion + #region FindTopPanelChildOfControl /// <summary> |
From: Dion O. <dol...@us...> - 2005-12-02 00:07:35
|
Update of /cvsroot/magicajax/magicajax/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20054/magicajax/Core Modified Files: MagicAjaxModule.cs PageFilter.cs Log Message: Made a quick fix for clientside validators in NoStore mode. Index: PageFilter.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/PageFilter.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PageFilter.cs 23 Nov 2005 19:34:23 -0000 1.2 --- PageFilter.cs 2 Dec 2005 00:07:27 -0000 1.3 *************** *** 27,31 **** string search = "<input type=\"hidden\" name=\"__VIEWSTATE\" id=\"__VIEWSTATE\" value=\""; #else ! string search = "<input type=\"hidden\" name=\"__VIEWSTATE\" value=\""; #endif string html = GetHtmlPage(); --- 27,31 ---- string search = "<input type=\"hidden\" name=\"__VIEWSTATE\" id=\"__VIEWSTATE\" value=\""; #else ! string search = "<input type=\"hidden\" name=\"__VIEWSTATE\" value=\""; #endif string html = GetHtmlPage(); *************** *** 41,44 **** --- 41,65 ---- return html.Substring(si, ei - si); } + + /// <summary> + /// Returns the javascript declaration of the 'Page_Validators' array in the output Html + /// </summary> + /// <returns></returns> + public string GetPageValidatorsArray() + { + string search = "Page_Validators = new Array("; + string clearValidatorArray = "Page_Validators = new Array();"; + + string html = GetHtmlPage(); + int si = html.IndexOf(search); + if (si == -1) + return clearValidatorArray; + + int ei = html.IndexOf(");", si); + if (ei == -1) + return clearValidatorArray; + + return html.Substring(si, ei - si + 2); + } #if NET_2_0 Index: MagicAjaxModule.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxModule.cs,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** MagicAjaxModule.cs 30 Nov 2005 12:22:29 -0000 1.36 --- MagicAjaxModule.cs 2 Dec 2005 00:07:27 -0000 1.37 *************** *** 509,512 **** --- 509,520 ---- AjaxCallHelper.WriteSetFieldScript("__VIEWSTATE", vsValue); } + + // Reset the javascript 'Page_Validators' array on each callback + // Note: this is a temporary solution until we find a better one + string pageValidatorsArray = _filter.GetPageValidatorsArray(); + if (pageValidatorsArray != null) + { + AjaxCallHelper.Write(pageValidatorsArray); + } #if NET_2_0 |
From: Argiris K. <be...@us...> - 2005-12-01 22:48:42
|
Update of /cvsroot/magicajax/magicajax/CustomControls/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30204/CustomControls/script Modified Files: Tag: STABLE AjaxLinkedPanelListScripts.js Log Message: Fixed the script for the custom controls to work properly. Index: AjaxLinkedPanelListScripts.js =================================================================== RCS file: /cvsroot/magicajax/magicajax/CustomControls/script/AjaxLinkedPanelListScripts.js,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** AjaxLinkedPanelListScripts.js 14 Nov 2005 18:50:43 -0000 1.2 --- AjaxLinkedPanelListScripts.js 1 Dec 2005 22:48:34 -0000 1.2.2.1 *************** *** 1,14 **** ! var prev_AJAXCbo_Complete = AJAXCbo.OnComplete; ! var prev_AJAXCbo_Error = AJAXCbo.OnError; ! AJAXCbo.OnComplete = AjaxLinkedPanelList_AJAXCbo_Complete; ! AJAXCbo.OnError = AjaxLinkedPanelList_AJAXCbo_Error; - function AjaxLinkedPanelList_AJAXCbo_Complete(responseText, responseXML) - { - var result = prev_AJAXCbo_Complete(responseText, responseXML); if (result == false) return false; ! RemoveLoadingImages(); --- 1,29 ---- ! AjaxCallObject.prototype.OnComplete = function (responseText, responseXML) ! { ! if (__bTracing) ! { ! this.TraceReceivedData(responseText); ! } ! var result; ! // Checking if the data were fully loaded, without being aborted ! var flag = "'AJAX_LOADING_OK';\r\n"; ! if (responseText.substr(responseText.length - flag.length) != flag) ! { ! result = false; ! } ! else ! { ! eval(responseText); ! ! if (waitElement) ! waitElement.style.visibility = 'hidden'; ! ! result = true; ! } if (result == false) return false; ! RemoveLoadingImages(); *************** *** 32,41 **** } - function AjaxLinkedPanelList_AJAXCbo_Error(status, statusText, responseText) - { - RemoveLoadingImages(); - prev_AJAXCbo_Error(status, statusText, responseText); - } - function AjaxLinkedPanelList_Link_Click(linkTarget) { --- 47,50 ---- |
From: Argiris K. <be...@us...> - 2005-12-01 01:16:44
|
Update of /cvsroot/magicajax/magicajax/Docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv491/Docs Modified Files: Tag: STABLE Changelog.html Log Message: Updated STABLE Change Log Index: Changelog.html =================================================================== RCS file: /cvsroot/magicajax/magicajax/Docs/Changelog.html,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** Changelog.html 30 Nov 2005 12:22:29 -0000 1.2 --- Changelog.html 1 Dec 2005 01:16:25 -0000 1.2.2.1 *************** *** 58,61 **** --- 58,64 ---- <ul> <li> + Fixed a bug in AjaxCallObject.js regarding ClockID; + AjaxCallHelper.SetAjaxCallTimerInterval is working properly now + <LI> Fixed the javascript errors the occured when the browser was not supported <li> |
From: Argiris K. <be...@us...> - 2005-12-01 00:30:23
|
Update of /cvsroot/magicajax/magicajax/Core/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21193/Core/script Modified Files: Tag: STABLE AjaxCallObject.js Log Message: Fixed a bug of SetIntervalForAjaxCall, made ClockID global variable. Index: AjaxCallObject.js =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/script/AjaxCallObject.js,v retrieving revision 1.27 retrieving revision 1.27.2.1 diff -C2 -d -r1.27 -r1.27.2.1 *** AjaxCallObject.js 29 Nov 2005 01:08:36 -0000 1.27 --- AjaxCallObject.js 1 Dec 2005 00:30:07 -0000 1.27.2.1 *************** *** 8,11 **** --- 8,12 ---- __PreviousOnPageUnload = null; __TraceWindows = new Array(); + __ClockID = 0; function AjaxCallObject() *************** *** 455,471 **** AjaxCallObject.prototype.TraceWindow = null; - AjaxCallObject.prototype.ClockID = 0; - AjaxCallObject.prototype.SetIntervalForAjaxCall = function(milliSec) { ! if (this.ClockID) this.ClearIntervalForAjaxCall(); ! this.ClockID = window.setInterval("AJAXCbo.DoAjaxCall('__AJAX_AJAXCALLTIMER','','async')", milliSec); } AjaxCallObject.prototype.ClearIntervalForAjaxCall = function() { ! window.clearInterval(this.ClockID); ! this.ClockID = 0; } --- 456,470 ---- AjaxCallObject.prototype.TraceWindow = null; AjaxCallObject.prototype.SetIntervalForAjaxCall = function(milliSec) { ! if (__ClockID != 0) this.ClearIntervalForAjaxCall(); ! __ClockID = window.setInterval("AJAXCbo.DoAjaxCall('__AJAX_AJAXCALLTIMER','','async')", milliSec); } AjaxCallObject.prototype.ClearIntervalForAjaxCall = function() { ! window.clearInterval(__ClockID); ! __ClockID = 0; } *************** *** 495,498 **** --- 494,498 ---- __TraceWindows.push(this.TraceWindow); } + this.TraceWindow.TraceFinished = false; } |
From: Argiris K. <be...@us...> - 2005-11-30 12:22:48
|
Update of /cvsroot/magicajax/magicajax/Core/UI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5437/Core/UI Modified Files: AjaxControl.cs AjaxPage.cs AjaxUserControl.cs RenderedByScriptControl.cs Log Message: --Fixed the javascript errors that occured when the browser was not supported. Added a 'IsBrowserSupported' check before any MagicAjax specific additions on the page. --An exception is thrown if MagicAjaxModule is not included in the HttpModules of web.config and the code tries to access MagicAjaxContext.Current . MagicAjaxContext is being created by MagicAjaxModule at the BeginRequest event. --Added 'MagicAjaxContext' protected property in AjaxControl, AjaxPage and AjaxUserControl classes and use it in the Ajax controls instead of MagicAjaxContext.Current Index: AjaxUserControl.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/AjaxUserControl.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AjaxUserControl.cs 23 Nov 2005 15:19:29 -0000 1.8 --- AjaxUserControl.cs 30 Nov 2005 12:22:29 -0000 1.9 *************** *** 35,38 **** --- 35,40 ---- public class AjaxUserControl : System.Web.UI.UserControl, IAjaxCallEventHandler { + private MagicAjaxContext _magicAjaxContext; + /// <summary> /// Raised by MagicAjaxModule when an AjaxCall occurs *************** *** 76,79 **** --- 78,92 ---- } + protected MagicAjaxContext MagicAjaxContext + { + get { return _magicAjaxContext; } + } + + protected override void OnInit(EventArgs e) + { + _magicAjaxContext = MagicAjaxContext.Current; + base.OnInit (e); + } + protected virtual void OnAjaxCall(EventArgs e) { Index: AjaxPage.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/AjaxPage.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AjaxPage.cs 23 Nov 2005 15:12:48 -0000 1.7 --- AjaxPage.cs 30 Nov 2005 12:22:29 -0000 1.8 *************** *** 35,38 **** --- 35,40 ---- public class AjaxPage : System.Web.UI.Page, IAjaxCallEventHandler { + private MagicAjaxContext _magicAjaxContext; + /// <summary> /// Raised by MagicAjaxModule when an AjaxCall occurs *************** *** 76,79 **** --- 78,92 ---- } + protected MagicAjaxContext MagicAjaxContext + { + get { return _magicAjaxContext; } + } + + protected override void OnInit(EventArgs e) + { + _magicAjaxContext = MagicAjaxContext.Current; + base.OnInit (e); + } + protected virtual void OnAjaxCall(EventArgs e) { Index: AjaxControl.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/AjaxControl.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AjaxControl.cs 23 Nov 2005 15:12:48 -0000 1.8 --- AjaxControl.cs 30 Nov 2005 12:22:29 -0000 1.9 *************** *** 33,36 **** --- 33,38 ---- public abstract class AjaxControl : System.Web.UI.WebControls.WebControl, IAjaxCallEventHandler { + private MagicAjaxContext _magicAjaxContext; + /// <summary> /// Raised by the MagicAjaxModule. *************** *** 76,82 **** --- 78,91 ---- public AjaxControl() { + _magicAjaxContext = MagicAjaxContext.Current; } public AjaxControl(HtmlTextWriterTag tag) : base(tag) { + _magicAjaxContext = MagicAjaxContext.Current; + } + + protected MagicAjaxContext MagicAjaxContext + { + get { return _magicAjaxContext; } } Index: RenderedByScriptControl.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/RenderedByScriptControl.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** RenderedByScriptControl.cs 25 Nov 2005 21:30:26 -0000 1.13 --- RenderedByScriptControl.cs 30 Nov 2005 12:22:29 -0000 1.14 *************** *** 184,188 **** protected override void OnPreRender(EventArgs e) { ! if (!IsChildOfRenderedByScriptControl(this)) { string hiddenStore; --- 184,188 ---- protected override void OnPreRender(EventArgs e) { ! if ( this.MagicAjaxContext.IsBrowserSupported && !IsChildOfRenderedByScriptControl(this)) { string hiddenStore; |
From: Argiris K. <be...@us...> - 2005-11-30 12:22:48
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Controls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5437/Core/UI/Controls Modified Files: AjaxPanel.cs Log Message: --Fixed the javascript errors that occured when the browser was not supported. Added a 'IsBrowserSupported' check before any MagicAjax specific additions on the page. --An exception is thrown if MagicAjaxModule is not included in the HttpModules of web.config and the code tries to access MagicAjaxContext.Current . MagicAjaxContext is being created by MagicAjaxModule at the BeginRequest event. --Added 'MagicAjaxContext' protected property in AjaxControl, AjaxPage and AjaxUserControl classes and use it in the Ajax controls instead of MagicAjaxContext.Current Index: AjaxPanel.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxPanel.cs,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** AjaxPanel.cs 29 Nov 2005 01:11:30 -0000 1.25 --- AjaxPanel.cs 30 Nov 2005 12:22:29 -0000 1.26 *************** *** 238,242 **** } ! Page.RegisterHiddenField (ControlCollectionState.GetControlFingerprintsField(this.ClientID), String.Empty); } #endregion --- 238,245 ---- } ! if ( this.MagicAjaxContext.IsBrowserSupported ) ! { ! Page.RegisterHiddenField (ControlCollectionState.GetControlFingerprintsField(this.ClientID), String.Empty); ! } } #endregion *************** *** 908,917 **** private string _literalFingerprint; private SortedList _controlHtmlFingerprints; ! private Control _owner; /// <summary> /// Default ctor /// </summary> ! public ControlCollectionState(Control owner) { _owner = owner; --- 911,920 ---- private string _literalFingerprint; private SortedList _controlHtmlFingerprints; ! private AjaxPanel _owner; /// <summary> /// Default ctor /// </summary> ! public ControlCollectionState(AjaxPanel owner) { _owner = owner; *************** *** 923,927 **** /// </summary> /// <param name="controlHtmlFingerprints"></param> ! public ControlCollectionState(string literalFingerprint, SortedList controlHtmlFingerprints, Control owner) { _owner = owner; --- 926,930 ---- /// </summary> /// <param name="controlHtmlFingerprints"></param> ! public ControlCollectionState(string literalFingerprint, SortedList controlHtmlFingerprints, AjaxPanel owner) { _owner = owner; *************** *** 935,939 **** /// <param name="panelClientID"></param> /// <returns></returns> ! public static ControlCollectionState LoadState(string panelClientID, Control owner) { string panelKey = GetControlFingerprintsField(panelClientID); --- 938,942 ---- /// <param name="panelClientID"></param> /// <returns></returns> ! public static ControlCollectionState LoadState(string panelClientID, AjaxPanel owner) { string panelKey = GetControlFingerprintsField(panelClientID); *************** *** 947,951 **** { string[] namevaluepairs = panelControlFingerprints.Split(';'); ! if (MagicAjaxContext.Current.Configuration.CompareMode == MagicAjax.Configuration.OutputCompareMode.FullHtml) { literalFingerprint = UnicodeEncoding.Default.GetString(Convert.FromBase64String(namevaluepairs[0])); --- 950,954 ---- { string[] namevaluepairs = panelControlFingerprints.Split(';'); ! if (owner.MagicAjaxContext.Configuration.CompareMode == MagicAjax.Configuration.OutputCompareMode.FullHtml) { literalFingerprint = UnicodeEncoding.Default.GetString(Convert.FromBase64String(namevaluepairs[0])); *************** *** 961,965 **** string[] namevalue = namevaluepair.Split('#'); ! if (MagicAjaxContext.Current.Configuration.CompareMode == MagicAjax.Configuration.OutputCompareMode.FullHtml) { controlHtmlFingerprints.Add(namevalue[0], UnicodeEncoding.Default.GetString(Convert.FromBase64String(namevalue[1]))); --- 964,968 ---- string[] namevalue = namevaluepair.Split('#'); ! if (owner.MagicAjaxContext.Configuration.CompareMode == MagicAjax.Configuration.OutputCompareMode.FullHtml) { controlHtmlFingerprints.Add(namevalue[0], UnicodeEncoding.Default.GetString(Convert.FromBase64String(namevalue[1]))); *************** *** 1019,1023 **** // Put the literal content first, before the control/fingerprint pairs ! if (MagicAjaxContext.Current.Configuration.CompareMode == MagicAjax.Configuration.OutputCompareMode.FullHtml) { sbuilder.Append (Convert.ToBase64String(UnicodeEncoding.Default.GetBytes(LiteralFingerprint))); --- 1022,1026 ---- // Put the literal content first, before the control/fingerprint pairs ! if (_owner.MagicAjaxContext.Configuration.CompareMode == MagicAjax.Configuration.OutputCompareMode.FullHtml) { sbuilder.Append (Convert.ToBase64String(UnicodeEncoding.Default.GetBytes(LiteralFingerprint))); *************** *** 1032,1036 **** sbuilder.Append(';'); ! if (MagicAjaxContext.Current.Configuration.CompareMode == MagicAjax.Configuration.OutputCompareMode.FullHtml) { sbuilder.AppendFormat("{0}#{1}", key, Convert.ToBase64String(UnicodeEncoding.Default.GetBytes((string)_controlHtmlFingerprints[key]))); --- 1035,1039 ---- sbuilder.Append(';'); ! if (_owner.MagicAjaxContext.Configuration.CompareMode == MagicAjax.Configuration.OutputCompareMode.FullHtml) { sbuilder.AppendFormat("{0}#{1}", key, Convert.ToBase64String(UnicodeEncoding.Default.GetBytes((string)_controlHtmlFingerprints[key]))); *************** *** 1045,1049 **** string panelKey = GetControlFingerprintsField(panelClientID); ! if ( MagicAjaxContext.Current.IsAjaxCallForPage(_owner.Page) ) { //if ajax callback, generate javascript to set panelfingerprints's hidden field value --- 1048,1052 ---- string panelKey = GetControlFingerprintsField(panelClientID); ! if ( _owner.MagicAjaxContext.IsAjaxCallForPage(_owner.Page) ) { //if ajax callback, generate javascript to set panelfingerprints's hidden field value *************** *** 1053,1057 **** } } ! else { // The hidden field is already registered at OnLoad event. --- 1056,1060 ---- } } ! else if (_owner.MagicAjaxContext.IsBrowserSupported ) { // The hidden field is already registered at OnLoad event. |
From: Argiris K. <be...@us...> - 2005-11-30 12:22:48
|
Update of /cvsroot/magicajax/magicajax/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5437/Core Modified Files: AjaxCallHelper.cs MagicAjaxContext.cs MagicAjaxModule.cs Log Message: --Fixed the javascript errors that occured when the browser was not supported. Added a 'IsBrowserSupported' check before any MagicAjax specific additions on the page. --An exception is thrown if MagicAjaxModule is not included in the HttpModules of web.config and the code tries to access MagicAjaxContext.Current . MagicAjaxContext is being created by MagicAjaxModule at the BeginRequest event. --Added 'MagicAjaxContext' protected property in AjaxControl, AjaxPage and AjaxUserControl classes and use it in the Ajax controls instead of MagicAjaxContext.Current Index: AjaxCallHelper.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/AjaxCallHelper.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** AjaxCallHelper.cs 27 Nov 2005 17:28:26 -0000 1.11 --- AjaxCallHelper.cs 30 Nov 2005 12:22:29 -0000 1.12 *************** *** 217,223 **** if (milliSeconds > 0) { ! if (MagicAjaxContext.Current.IsAjaxCall) Write (String.Format("AJAXCbo.SetIntervalForAjaxCall({0});", milliSeconds)); ! else { //EnableAjaxOnPage(); --- 217,225 ---- if (milliSeconds > 0) { ! if ( MagicAjaxContext.Current.IsAjaxCall ) ! { Write (String.Format("AJAXCbo.SetIntervalForAjaxCall({0});", milliSeconds)); ! } ! else if ( MagicAjaxContext.Current.IsBrowserSupported ) { //EnableAjaxOnPage(); Index: MagicAjaxContext.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxContext.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MagicAjaxContext.cs 27 Nov 2005 17:28:26 -0000 1.6 --- MagicAjaxContext.cs 30 Nov 2005 12:22:29 -0000 1.7 *************** *** 32,35 **** --- 32,37 ---- public class MagicAjaxContext { + internal static readonly string ContextKey = "__MAGICAJAXCONTEXT"; + #region Private properties private bool _isAjaxCall = false; *************** *** 164,168 **** #region Public Ctor ! public MagicAjaxContext() { // Load configuration from web.config --- 166,170 ---- #region Public Ctor ! internal MagicAjaxContext() { // Load configuration from web.config *************** *** 208,217 **** { // get the portal context for the current HTTP request ! magicAjaxContext = (MagicAjaxContext)HttpContext.Current.Items["__MAGICAJAXCONTEXT"]; if ( magicAjaxContext == null ) { ! // create a new context and add it to the items collection for later retrieval ! magicAjaxContext = new MagicAjaxContext(); ! HttpContext.Current.Items.Add("__MAGICAJAXCONTEXT", magicAjaxContext); } } --- 210,218 ---- { // get the portal context for the current HTTP request ! magicAjaxContext = (MagicAjaxContext)HttpContext.Current.Items[ContextKey]; if ( magicAjaxContext == null ) { ! // MagicAjaxModule is not loaded ! throw new MagicAjaxException("The MagicAjax HttpModule is not included in web.config. Add [<httpModules><add name=\"MagicAjax\" type=\"MagicAjax.MagicAjaxModule, MagicAjax\" /></httpModules>] inside the <system.web> section."); } } Index: MagicAjaxModule.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxModule.cs,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** MagicAjaxModule.cs 25 Nov 2005 20:45:47 -0000 1.35 --- MagicAjaxModule.cs 30 Nov 2005 12:22:29 -0000 1.36 *************** *** 396,401 **** _request = context.Request; _response = context.Response; - _magicAjaxContext = MagicAjaxContext.Current; // Check if the request is for the embedded AjaxCallObject.js script --- 396,404 ---- _request = context.Request; _response = context.Response; + // Create a new context and add it to the items collection for later retrieval + // by MagicAjaxContext.Current + _magicAjaxContext = new MagicAjaxContext(); + HttpContext.Current.Items.Add(MagicAjaxContext.ContextKey, _magicAjaxContext); // Check if the request is for the embedded AjaxCallObject.js script |
From: Argiris K. <be...@us...> - 2005-11-30 12:22:48
|
Update of /cvsroot/magicajax/magicajax/Docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5437/Docs Modified Files: Changelog.html Log Message: --Fixed the javascript errors that occured when the browser was not supported. Added a 'IsBrowserSupported' check before any MagicAjax specific additions on the page. --An exception is thrown if MagicAjaxModule is not included in the HttpModules of web.config and the code tries to access MagicAjaxContext.Current . MagicAjaxContext is being created by MagicAjaxModule at the BeginRequest event. --Added 'MagicAjaxContext' protected property in AjaxControl, AjaxPage and AjaxUserControl classes and use it in the Ajax controls instead of MagicAjaxContext.Current Index: Changelog.html =================================================================== RCS file: /cvsroot/magicajax/magicajax/Docs/Changelog.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Changelog.html 29 Nov 2005 09:56:32 -0000 1.1 --- Changelog.html 30 Nov 2005 12:22:29 -0000 1.2 *************** *** 54,57 **** --- 54,70 ---- <p class="header" align="center">MagicAjax.NET Framework</p> <P class="header" align="center">Change Log</P> + <P class="MainHeader" align="left"> </P> + <p>Changes since 0.2.1</p> + <ul> + <li> + Fixed the javascript errors the occured when the browser was not supported + <li> + An exception is thrown if MagicAjaxModule is not included in the HttpModules of + web.config and the code tries to access MagicAjaxContext.Current + <li> + Added 'MagicAjaxContext' protected property in AjaxControl, AjaxPage and + AjaxUserControl classes. + </li> + </ul> <p class="MainHeader" align="left">v0.2.1 (29 November 2005) - Maintenance Release</p> <p>Changes since 0.2.0</p> |
From: Argiris K. <be...@us...> - 2005-11-29 09:56:42
|
Update of /cvsroot/magicajax/magicajax/Docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv932/Docs Modified Files: Readme.html Added Files: Changelog.html Log Message: Updated the docs and the version number. Index: Readme.html =================================================================== RCS file: /cvsroot/magicajax/magicajax/Docs/Readme.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Readme.html 27 Nov 2005 17:30:00 -0000 1.3 --- Readme.html 29 Nov 2005 09:56:32 -0000 1.4 *************** *** 55,64 **** <P class="header" align="center">README file</P> <p class="MainHeader" align="left">Summary</p> ! <p>MagicAjax.NET is a framework written in C# that provides AJAX technologies ! for web pages created with ASP.NET. It is designed to make it easier and more ! intuitive for developers to integrate AJAX support into their pages, ! without replacing the ASP.NET controls and/or writing javascript code. </p> <p class="MainHeader" align="left">Index Of Contents</p> <p class="NewsDate"><A href="Features.html">Features</A></p> <p class="MainContent">A summary of MagicAjax's main features.</p> --- 55,67 ---- <P class="header" align="center">README file</P> <p class="MainHeader" align="left">Summary</p> ! <p>MagicAjax.NET is a framework written in C# that provides AJAX technologies for ! web pages created with ASP.NET. It is designed to make it easier and more ! intuitive for developers to integrate AJAX support into their pages, without ! replacing the ASP.NET controls and/or writing javascript code. </p> <p class="MainHeader" align="left">Index Of Contents</p> + <p class="NewsDate"><a href="ChangeLog.html">What's New?</a></p> + <p>A summary of the new and altered features in this release. + </p> <p class="NewsDate"><A href="Features.html">Features</A></p> <p class="MainContent">A summary of MagicAjax's main features.</p> --- NEW FILE: Changelog.html --- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>MagicAjax.NET ChangeLog</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .MainHeader { font-weight: bold; color: white; background-color: #0066cc; font-size: 10pt} body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: black; background-color: white} .BorderHeader { background-color: #999900; font-size: 8pt; font-weight: bold; color: #333300; text-align: center} .MainContent { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: black } .BorderContent { font-size: 8pt; color: black; border-color: black #666600 #666600; padding-top: 2px; padding-right: 2px; padding-bottom: 10px; padding-left: 2px; margin-bottom: 2px; border-style: solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px} a:link { color: #000099; text-decoration: underline} a:hover { color: #000099; text-decoration: underline} a:visited { color: #000099; text-decoration: underline} li { color: black; list-style-type: circle; position: relative; left: -15px; clip: rect( )} .NewsDate { color: black; font-weight: bold} td { font-size: 10pt} th { font-size: 10pt} .Annotation { font-size: 10px} H1 { text-align: center; } A.qindex {} A.qindexRef {} A.el { text-decoration: none; font-weight: bold } A.elRef { font-weight: bold } A.code { text-decoration: none; font-weight: normal; color: #4444ee } A.codeRef { font-weight: normal; color: #4444ee } DL.el { margin-left: -1cm } DIV.fragment { width: 100%; border: none; background-color: #003300 } DIV.ah { background-color: black; margin-bottom: 3; margin-top: 3 } TD.md { background-color: #006600 } DIV.groupHeader { margin-left: 16; margin-top: 12; margin-bottom: 6; font-weight: bold } DIV.groupText { margin-left: 16; font-style: italic; font-size: smaller } FONT.keyword { color: #008000 } FONT.keywordtype { color: #999920 } FONT.keywordflow { color: #e0FF00 } FONT.comment { color: #009900 } FONT.preprocessor { color: #809020 } FONT.stringliteral { color: #002080 } FONT.charliteral { color: #008080 } H3 { FONT-FAMILY: trebuchet ms,helvetica,arial } .ex { FONT-SIZE: 8pt; FONT-FAMILY: tahoma } CODE.keywordtype { COLOR: #00ccff } CODE.keyword { FONT-WEIGHT: bold; COLOR: #00ccff } CODE.fn { COLOR: white; FONT-WEIGHT: bold; } CODE.var { COLOR: #dcdcdc; } CODE.macro { COLOR: #809020; FONT-WEIGHT: bold; } CODE.comm { COLOR: lime } CODE.num { COLOR: purple } CODE.str { COLOR: #ffcc33; font-style: italic } .SectionHeader { font-size: 14px; color: #FFFFCC; font-weight: bold} .header { font-size: 16px; font-weight: bold; color: #663399} --></style> </head> <body text="#000000" bgColor="#ffffff"> <p class="header" align="center">MagicAjax.NET Framework</p> <P class="header" align="center">Change Log</P> <p class="MainHeader" align="left">v0.2.1 (29 November 2005) - Maintenance Release</p> <p>Changes since 0.2.0</p> <ul> <li> Fixed a bug in AjaxCallObject.js; when the server reported an exception and 'tracing' was disabled, instead of rendering the error page a 'this.TraceWindow.document is null or not an object' javascript error occured <li> AjaxPanel is no longer a NamingContainer </li> </ul> <P class="MainHeader" align="left"> </P> <P>Copyright © 2005 by The MagicAjax.NET Team</P> </body> </html> |
From: Argiris K. <be...@us...> - 2005-11-29 09:56:42
|
Update of /cvsroot/magicajax/magicajax/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv932/Core Modified Files: AssemblyInfo.cs Log Message: Updated the docs and the version number. Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/AssemblyInfo.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AssemblyInfo.cs 18 Nov 2005 18:53:07 -0000 1.4 --- AssemblyInfo.cs 29 Nov 2005 09:56:32 -0000 1.5 *************** *** 36,40 **** // by using the '*' as shown below: ! [assembly: AssemblyVersion("0.2.0.*")] // --- 36,40 ---- // by using the '*' as shown below: ! [assembly: AssemblyVersion("0.2.1.*")] // |
From: Argiris K. <be...@us...> - 2005-11-29 01:11:37
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Controls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12081/Core/UI/Controls Modified Files: AjaxPanel.cs Log Message: Removed INaminContainer from AjaxPanel. Now that only WebControls are enclosed inside marker tags, there's no need for AjaxPanel to be a container; it will be confusing to the developers. Index: AjaxPanel.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxPanel.cs,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** AjaxPanel.cs 26 Nov 2005 12:14:41 -0000 1.24 --- AjaxPanel.cs 29 Nov 2005 01:11:30 -0000 1.25 *************** *** 76,80 **** PersistChildren(true), ToolboxData("<{0}:AjaxPanel runat=server>AjaxPanel</{0}:AjaxPanel>")] ! public class AjaxPanel : RenderedByScriptControl, IFormDataLoadedEventHandler, INamingContainer { #region Fields --- 76,80 ---- PersistChildren(true), ToolboxData("<{0}:AjaxPanel runat=server>AjaxPanel</{0}:AjaxPanel>")] ! public class AjaxPanel : RenderedByScriptControl, IFormDataLoadedEventHandler { #region Fields *************** *** 402,428 **** } ! // Find removed controls _removedControls.Clear(); - foreach (string clientID in _controlState.ControlHtmlFingerprints.Keys) - { - int i; - for (i=0; i < this.Controls.Count; i++) - { - if (this.Controls[i].ClientID == clientID) - break; - } - - if (i == this.Controls.Count) - { - // The control is removed. Add a control with the same id - // so that RenderByScript "removes" it from page - if ( clientID.StartsWith (this.ClientID) ) - { - Literal lit = new Literal(); - lit.ID = clientID.Substring(this.ClientID.Length + 1); - _removedControls.Add (lit); - } - } - } } --- 402,409 ---- } ! // Removed controls do not render their 'marker tags' and will be removed from ! // page when literal content is rendered. So there's no need to ! // explicitly send javascript command to remove a control. _removedControls.Clear(); } *************** *** 982,990 **** if (MagicAjaxContext.Current.Configuration.CompareMode == MagicAjax.Configuration.OutputCompareMode.FullHtml) { ! controlHtmlFingerprints.Add(string.Format("{0}_{1}", panelClientID, namevalue[0]), UnicodeEncoding.Default.GetString(Convert.FromBase64String(namevalue[1]))); } else { ! controlHtmlFingerprints.Add(string.Format("{0}_{1}", panelClientID, namevalue[0]), namevalue[1]); } } --- 963,971 ---- if (MagicAjaxContext.Current.Configuration.CompareMode == MagicAjax.Configuration.OutputCompareMode.FullHtml) { ! controlHtmlFingerprints.Add(namevalue[0], UnicodeEncoding.Default.GetString(Convert.FromBase64String(namevalue[1]))); } else { ! controlHtmlFingerprints.Add(namevalue[0], namevalue[1]); } } *************** *** 1051,1063 **** sbuilder.Append(';'); - string keyWithoutNamingcontainer = key.Substring(panelClientID.Length + 1); - if (MagicAjaxContext.Current.Configuration.CompareMode == MagicAjax.Configuration.OutputCompareMode.FullHtml) { ! sbuilder.AppendFormat("{0}#{1}", keyWithoutNamingcontainer, Convert.ToBase64String(UnicodeEncoding.Default.GetBytes((string)_controlHtmlFingerprints[key]))); } else { ! sbuilder.AppendFormat("{0}#{1}", keyWithoutNamingcontainer, _controlHtmlFingerprints[key]); } } --- 1032,1042 ---- sbuilder.Append(';'); if (MagicAjaxContext.Current.Configuration.CompareMode == MagicAjax.Configuration.OutputCompareMode.FullHtml) { ! sbuilder.AppendFormat("{0}#{1}", key, Convert.ToBase64String(UnicodeEncoding.Default.GetBytes((string)_controlHtmlFingerprints[key]))); } else { ! sbuilder.AppendFormat("{0}#{1}", key, _controlHtmlFingerprints[key]); } } |
From: Argiris K. <be...@us...> - 2005-11-29 01:08:44
|
Update of /cvsroot/magicajax/magicajax/Core/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10910/Core/script Modified Files: AjaxCallObject.js Log Message: Fixed a tracing bug. When an exception is thrown by server, AjaxCallObject.js tries to write to the trace window even if tracing is not enabled. Index: AjaxCallObject.js =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/script/AjaxCallObject.js,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** AjaxCallObject.js 26 Nov 2005 12:14:41 -0000 1.26 --- AjaxCallObject.js 29 Nov 2005 01:08:36 -0000 1.27 *************** *** 393,398 **** AjaxCallObject.prototype.OnAbort = function() { ! this.WriteTrace("<b>!!! AjaxCall was aborted !!!</b>"); ! this.CloseTrace(); if (waitElement) --- 393,401 ---- AjaxCallObject.prototype.OnAbort = function() { ! if (__bTracing) ! { ! this.WriteTrace("<b>!!! AjaxCall was aborted !!!</b>"); ! this.CloseTrace(); ! } if (waitElement) *************** *** 402,407 **** AjaxCallObject.prototype.OnError = function(status, statusText, responseText) { ! this.WriteTrace("<b>!!! Server reported an Error !!!</b>"); ! this.CloseTrace(); if (waitElement) --- 405,413 ---- AjaxCallObject.prototype.OnError = function(status, statusText, responseText) { ! if (__bTracing) ! { ! this.WriteTrace("<b>!!! Server reported an Error !!!</b>"); ! this.CloseTrace(); ! } if (waitElement) |
From: Argiris K. <be...@us...> - 2005-11-27 17:30:20
|
Update of /cvsroot/magicajax/magicajax/Docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8325/Docs Modified Files: Configuration.html Features.html Integration.html Readme.html Usage.html Added Files: Limitations.html Log Message: Finished the Docs stuff. --- NEW FILE: Limitations.html --- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>MagicAjax.NET Limitations</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .MainHeader { font-weight: bold; color: white; background-color: #0066cc; font-size: 10pt} body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: black; background-color: white} .BorderHeader { background-color: #999900; font-size: 8pt; font-weight: bold; color: #333300; text-align: center} .MainContent { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: black } .BorderContent { font-size: 8pt; color: black; border-color: black #666600 #666600; padding-top: 2px; padding-right: 2px; padding-bottom: 10px; padding-left: 2px; margin-bottom: 2px; border-style: solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px} a:link { color: #000099; text-decoration: underline} a:hover { color: #000099; text-decoration: underline} a:visited { color: #000099; text-decoration: underline} li { color: black; list-style-type: circle; position: relative; left: -15px; clip: rect( )} .NewsDate { color: black; font-weight: bold} td { font-size: 10pt} th { font-size: 10pt} .Annotation { font-size: 10px} H1 { text-align: center; } A.qindex {} A.qindexRef {} A.el { text-decoration: none; font-weight: bold } A.elRef { font-weight: bold } A.code { text-decoration: none; font-weight: normal; color: #4444ee } A.codeRef { font-weight: normal; color: #4444ee } DL.el { margin-left: -1cm } DIV.fragment { width: 100%; border: none; background-color: #003300 } DIV.ah { background-color: black; margin-bottom: 3; margin-top: 3 } TD.md { background-color: #006600 } DIV.groupHeader { margin-left: 16; margin-top: 12; margin-bottom: 6; font-weight: bold } DIV.groupText { margin-left: 16; font-style: italic; font-size: smaller } FONT.keyword { color: #008000 } FONT.keywordtype { color: #999920 } FONT.keywordflow { color: #e0FF00 } FONT.comment { color: #009900 } FONT.preprocessor { color: #809020 } FONT.stringliteral { color: #002080 } FONT.charliteral { color: #008080 } H3 { FONT-FAMILY: trebuchet ms,helvetica,arial } .ex { FONT-SIZE: 8pt; FONT-FAMILY: tahoma } CODE.keywordtype { COLOR: #00ccff } CODE.keyword { FONT-WEIGHT: bold; COLOR: #00ccff } CODE.fn { COLOR: white; FONT-WEIGHT: bold; } CODE.var { COLOR: #dcdcdc; } CODE.macro { COLOR: #809020; FONT-WEIGHT: bold; } CODE.comm { COLOR: lime } CODE.num { COLOR: purple } CODE.str { COLOR: #ffcc33; font-style: italic } .SectionHeader { font-size: 14px; color: #FFFFCC; font-weight: bold} .header { font-size: 16px; font-weight: bold; color: #663399} --></style> </head> <body text="#000000" bgColor="#ffffff"> <p class="header" align="center">MagicAjax.NET Framework</p> <P class="header" align="center">Limitations</P> <p class="MainHeader" align="left">MagicAjax Limitations</p> <p class="MainContent"> These are the currently known limitations of MagicAjax v0.2.:</p> <p class="MainContent"> <UL> <LI> Only IE and Firefox browsers are supported. MagicAjax will be disabled for other browsers and the page will work with plain PostBacks <li> For the <a href="Configuration.html#mode">NoStore PageStore mode</a>, if the tag attributes (CssClass, BackColor, etc.) of an AjaxPanel change during an AjaxCall, the changes will not be reflected to the client's browser </li> </UL> <P></P> <p class="NewsDate">.NET 2.0 Limitations</p> <p class="MainContent"> <ul> <LI> 'Server.Transfer' method call during an AjaxCall is not handled properly <li> <a href="Configuration.html#mode">Session/Cache PageStore modes</a> are not supported </li> </ul> <P></P> <P class="MainHeader" align="left"> </P> <P>Copyright © 2005 by The MagicAjax.NET Team</P> </body> </html> Index: Configuration.html =================================================================== RCS file: /cvsroot/magicajax/magicajax/Docs/Configuration.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Configuration.html 26 Nov 2005 14:50:54 -0000 1.1 --- Configuration.html 27 Nov 2005 17:30:00 -0000 1.2 *************** *** 2,6 **** <html> <head> ! <title>MagicAjax.NET Readme</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .MainHeader { font-weight: bold; color: white; background-color: #0066cc; font-size: 10pt} --- 2,6 ---- <html> <head> ! <title>MagicAjax.NET Configuration</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .MainHeader { font-weight: bold; color: white; background-color: #0066cc; font-size: 10pt} *************** *** 157,166 **** <hr> <P></P> ! <p class="NewsDate">OutputCompareMode</p> <p class="MainContent"><b>Type:</b> enumeration (HashCode / MD5 / FullHtml)<br> <b>Default:</b> HashCode<br> <b>Description:</b> ! When an AjaxCall is invoked, MagicAjax compares the previous html rendering of ! controls included in an AjaxPanel with the current one, to see if changes occured. Instead of keeping the complete html string, MagicAjax produces 'fingerprints' of the html rendering strings to compare them. When --- 157,166 ---- <hr> <P></P> ! <p class="NewsDate"><a name="OutputCompareMode"></a>OutputCompareMode</p> <p class="MainContent"><b>Type:</b> enumeration (HashCode / MD5 / FullHtml)<br> <b>Default:</b> HashCode<br> <b>Description:</b> ! When an AjaxCall is invoked, MagicAjax compares the previous html renderings of ! controls included in an AjaxPanel with the current ones, to see if changes occured. Instead of keeping the complete html string, MagicAjax produces 'fingerprints' of the html rendering strings to compare them. When Index: Usage.html =================================================================== RCS file: /cvsroot/magicajax/magicajax/Docs/Usage.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Usage.html 25 Nov 2005 00:04:50 -0000 1.1 --- Usage.html 27 Nov 2005 17:30:00 -0000 1.2 *************** *** 2,6 **** <html> <head> ! <title>MagicAjax.NET Readme</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .MainHeader { font-weight: bold; color: white; background-color: #0066cc; font-size: 10pt} --- 2,6 ---- <html> <head> ! <title>MagicAjax.NET Usage</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .MainHeader { font-weight: bold; color: white; background-color: #0066cc; font-size: 10pt} *************** *** 13,17 **** a:visited { color: #000099; text-decoration: underline} li { color: black; list-style-type: circle; position: relative; left: -15px; clip: rect( )} ! .NewsDate { color: black; font-weight: bold} td { font-size: 10pt} th { font-size: 10pt} --- 13,17 ---- a:visited { color: #000099; text-decoration: underline} li { color: black; list-style-type: circle; position: relative; left: -15px; clip: rect( )} ! .NewsDate { color: black; font-weight: bold; font-size: 11pt} td { font-size: 10pt} th { font-size: 10pt} *************** *** 57,80 **** <UL> <LI> ! <a href="#ajaxpanel">AjaxPanel</a> ! <LI> ! <a href="#AjaxHtml">AjaxHtmlAnchor and AjaxHtmlImage</a> ! <LI> ! <a href="#AjaxPage">AjaxPage and AjaxUserControl</a> ! <LI> ! <a href="#attributes">Additional attributes for ASP.NET controls</a> ! </LI> </UL> ! <p class="MainHeader" align="left">MagicAjax Usage</p> <p class="NewsDate"><a name="ajaxpanel"></a>AjaxPanel</p> ! <p class="MainContent"> ! This is the core control of the MagicAjax framework. For all the controls that ! are inside an AjaxPanel, their PostBack functionality is replaced by an AJAX ! callback (AjaxCall), unless defined otherwise. </p> ! <P class="MainContent">Its <i>AjaxCallConnection </i>property can be set to: <ul> <li> ! Asynchronous <ul> The AjaxCall will be invoked in the background --- 57,120 ---- <UL> <LI> ! Programming ! <ul> ! <li> ! <A href="#ajaxcall">Handling an AjaxCall</A> ! </li> ! </ul> ! <li> ! Controls ! <ul> ! <LI> ! <A href="#ajaxpanel">AjaxPanel</A> ! <LI> ! <A href="#AjaxHtml">AjaxHtmlAnchor and AjaxHtmlImage</A> ! <LI> ! <A href="#AjaxPage">AjaxPage and AjaxUserControl</A> ! <LI> ! <A href="#attributes">MagicAjax attributes for ASP.NET controls</A> ! </LI> ! </ul> ! </li> </UL> ! <p class="MainHeader" align="left">Programming</p> ! <p class="NewsDate"><a name="ajaxcall"></a>Handling an AjaxCall</p> ! <p class="MainContent">Depending on the PageStore Mode configuration option, the ! page's execution cycle will differ significantly (see <A href="Configuration.html#Mode"> ! Configuration Options</A>). For the default 'NoStore' mode, the page's ! execution cycle will be the same as a PostBack. You can distinguish if a ! PostBack or an AjaxCall occured, by checking the return value of the <b>MagicAjaxContext.Current.IsAjaxCallForPage</b> ! method. ! </p> ! <P class="MainContent"><b>Note:</b> There is a <b>MagicAjaxContext.Current.IsAjaxCall</b> ! property that is true if the http request was originated by an AjaxCall, but ! the recommended method of checking whether an AjaxCall was invoked is by using <b>IsAjaxCallForPage</b>. ! If the page is created because of a <i>Server.Transfer</i> call that occured ! during an AjaxCall, IsAjaxCallForPage will return false so that your page can ! execute as a normal page request. The <b>AjaxPage.IsAjaxCall</b> property, ! that makes a call to IsAjaxCallForPage, is provided for convenience (see <A href="#AjaxPage"> ! AjaxPage</A>).</P> ! <P class="MainContent">MagicAjax sends javascript code to the client as a response ! to an AjaxCall. If you want to send your custom javascript along with ! MagicAjax's, you can use the static functions of <b>AjaxCallHelper</b>. ! For example: ! <pre> private void Button1_Click(object sender, System.EventArgs e) ! { ! AjaxCallHelper.WriteAlert ("Button1 was clicked."); ! }</pre> ! <P></P> ! <p class="MainHeader" align="left">Controls</p> <p class="NewsDate"><a name="ajaxpanel"></a>AjaxPanel</p> ! <p class="MainContent">This is the core control of the MagicAjax framework. The ! PostBack functionality of all the controls that are inside an AjaxPanel will be ! replaced by an AJAX callback (AjaxCall), unless defined otherwise. AjaxPanel ! works like the ASP.NET Panel, its contents are visible on the designer, you ! can set all the WebControl attributes to it, change its Visible property ! etc. </p> ! <P class="MainContent">Its <b>AjaxCallConnection </b>property can be set to: <ul> <li> ! Asynchronous (Default) <ul> The AjaxCall will be invoked in the background *************** *** 93,113 **** </ul> <P></P> ! <P class="MainContent">AjaxPanel works like the ASP.NET Panel, its contents are ! visible on the designer, you can add all the WebControl attributes to it, ! change its Visible property etc.</P> ! <P class="MainContent">AjaxPanel checks its</P> <p class="NewsDate"><a name="AjaxHtml"></a>AjaxHtmlAnchor and AjaxHtmlImage</p> ! <p class="MainContent"> ! It is recommended ! </p> <p class="NewsDate"><a name="AjaxPage"></a>AjaxPage and AjaxUserControl</p> ! <p class="MainContent"> ! It is recommended ! </p> ! <p class="NewsDate"><a name="attributes"></a>Additional attributes for ASP.NET controls</p> ! <p class="MainContent"> ! It is recommended </p> <P class="MainHeader" align="left"> </P> <P>Copyright © 2005 by The MagicAjax.NET Team</P> --- 133,217 ---- </ul> <P></P> ! <P class="MainContent">In order to reduce the amount of html needed to send to ! client, AjaxPanel defines individual 'html holders'. If the html ! of a holder changes during an AjaxCall, MagicAjax sends the whole ! html of the holder so that it can be reflected to the client's browser. ! Every immediate WebControl child of an AjaxPanel is considered a separate ! holder, and one extra holder is defined for the literal and HtmlControls ! content of the AjaxPanel. Thus, if the html of a WebControl, that is ! enclosed inside an AjaxPanel, changes, only the html of the particular ! WebControl will be sent to the client.</P> ! <P class="MainContent">An AjaxPanel (child AjaxPanel) that is inside ! another AjaxPanel (parent AjaxPanel), define its html holders separately from ! its parent. The parent AjaxPanel will ignore the html of the child AjaxPanel; ! only the child AjaxPanel will be responsible for reflecting its holders on the ! client. Thus, you can reduce the traffic of AjaxCalls, by adding many ! AjaxPanels that define more and smaller html holders. For example, if you put a ! table inside an AjaxPanel and change one of its cells during an AjaxCall, the ! complete html of the table is going to be sent to the client. On the other ! hand, if you add an AjaxPanel for each cell, only the html of the contents of ! the changed cell will be sent to the client.</P> ! <P class="MainContent">In order to monitor the traffic of AjaxCalls that your page ! is producing, you can enable the <A href="Configuration.html#tracing">tracing</A> configuration ! option.</P> ! <P class="MainContent"> ! <hr> ! <P></P> ! <P></P> <p class="NewsDate"><a name="AjaxHtml"></a>AjaxHtmlAnchor and AjaxHtmlImage</p> ! <p class="MainContent">These controls are intented to be used only for the <A href="Configuration.html#Mode"> ! Session/Cache PageStore modes</A>. When these modes are selected, ASP.NET's ! HtmlAnchor and HtmlImage loose their <i>href</i> and <i>src</i> attributes ! during an AjaxCall. AjaxHtmlAnchor and AjaxHtmlImage can be used in their ! place. ! <hr> ! <P></P> <p class="NewsDate"><a name="AjaxPage"></a>AjaxPage and AjaxUserControl</p> ! <p class="MainContent">Making your pages and usercontrols inherit from AjaxPage and ! AjaxUserControl is not required; they're provided only for convenience. They ! expose the MagicAjax's stored page events (see <A href="Configuration.html#Mode">Session/Cache ! PageStore modes</A>) and provide the <b>IsAjaxCall</b> property that makes ! a call to MagicAjaxContext.Current.IsAjaxCallForPage. ! <hr> ! <P></P> ! <p class="NewsDate"><a name="attributes"></a>MagicAjax attributes for ASP.NET controls</p> ! <p class="MainContent">You can add special attributes to ASP.NET controls that ! define how they will be handled by MagicAjax: ! <ul> ! <li> ! <b>AjaxCall</b> ("Async" or "Sync" or "None") ! <p>If you add the <i>AjaxCall</i> attribute with "Async"/"Sync" value to a control ! that has PostBack functionality (i.e. Button, LinkButton, CheckBox, etc.) the ! PostBack functionality of the control will be replaced by AJAX functionality, ! even if it is not contained inside an AjaxPanel. If you add the <i>AjaxCall</i> ! attribute with "None" value to a control that is inside an AjaxPanel, the ! control will perform a PostBack instead of an AjaxCall. By adding the <i>AjaxCall</i> ! attribute, you override the AjaxCallConnection property of its parent AjaxPanel ! (if the AjaxPanel is set to Asynchronous, you can add <i>AjaxCall</i> with ! "sync" value to a control to make it perform a synchronous AjaxCall). The ! effect of the <i>AjaxCall</i> attribute is applied to all the children of the ! control, so if you add it to a plain ASP.NET Panel, all the controls that are ! contained inside this Panel will get the effect of the <i>AjaxCall</i> attribute. ! </p> ! <li> ! <b>ExcludeFromPost</b> ("true" or "false") ! <p>When an AjaxCall is invoked, the client sends the values of the form elements to ! the server as POST data. If there is a control that is used only to display ! information and not to get input from the user, you can add the <i>ExcludeFromPost</i> ! attribute with "true" value and the value of this control will not be sent ! to the server. For example, if your page contains a readonly TextBox that is ! used to display chat messages, sending its contents for every AjaxCall is ! unnecessary traffic; you can avoid it by using the <i>ExcludeFromPost</i> attribute.</p> ! </li> ! </ul> ! <P></P> ! <p>All the attributes can be added using the visual designer or by code. Their ! values, and consequently their function, can be changed during an AjaxCall. </p> + <p>Example: + <pre> Button1.Attributes["ajaxcall"] = "async";</pre> + <hr> + <P></P> <P class="MainHeader" align="left"> </P> <P>Copyright © 2005 by The MagicAjax.NET Team</P> Index: Readme.html =================================================================== RCS file: /cvsroot/magicajax/magicajax/Docs/Readme.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Readme.html 26 Nov 2005 14:50:54 -0000 1.2 --- Readme.html 27 Nov 2005 17:30:00 -0000 1.3 *************** *** 57,61 **** <p>MagicAjax.NET is a framework written in C# that provides AJAX technologies for web pages created with ASP.NET. It is designed to make it easier and more ! intuitive for developers to integrate AJAX support into their pages without replacing the ASP.NET controls and/or writing javascript code. </p> --- 57,61 ---- <p>MagicAjax.NET is a framework written in C# that provides AJAX technologies for web pages created with ASP.NET. It is designed to make it easier and more ! intuitive for developers to integrate AJAX support into their pages, without replacing the ASP.NET controls and/or writing javascript code. </p> Index: Integration.html =================================================================== RCS file: /cvsroot/magicajax/magicajax/Docs/Integration.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Integration.html 26 Nov 2005 14:50:54 -0000 1.2 --- Integration.html 27 Nov 2005 17:30:00 -0000 1.3 *************** *** 2,6 **** <html> <head> ! <title>MagicAjax.NET Readme</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .MainHeader { font-weight: bold; color: white; background-color: #0066cc; font-size: 10pt} --- 2,6 ---- <html> <head> ! <title>MagicAjax.NET Integration</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .MainHeader { font-weight: bold; color: white; background-color: #0066cc; font-size: 10pt} *************** *** 57,62 **** <p class="NewsDate">Modifying web.config</p> <p class="MainContent"> ! The MagicAjaxModule should be registered in the web.config file of your ! application, like this: <pre> <httpModules> --- 57,62 ---- <p class="NewsDate">Modifying web.config</p> <p class="MainContent"> ! The MagicAjaxModule should be registered in the <i>system.web</i> section of ! the web.config file of your application, like this: <pre> <httpModules> Index: Features.html =================================================================== RCS file: /cvsroot/magicajax/magicajax/Docs/Features.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Features.html 26 Nov 2005 14:50:54 -0000 1.2 --- Features.html 27 Nov 2005 17:30:00 -0000 1.3 *************** *** 2,6 **** <html> <head> ! <title>MagicAjax.NET Readme</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .MainHeader { font-weight: bold; color: white; background-color: #0066cc; font-size: 10pt} --- 2,6 ---- <html> <head> ! <title>MagicAjax.NET Features</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .MainHeader { font-weight: bold; color: white; background-color: #0066cc; font-size: 10pt} |
From: Argiris K. <be...@us...> - 2005-11-27 17:28:36
|
Update of /cvsroot/magicajax/magicajax/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8040/Core Modified Files: AjaxCallHelper.cs MagicAjaxContext.cs Log Message: Removed some unnecessary Contains checks. Index: AjaxCallHelper.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/AjaxCallHelper.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** AjaxCallHelper.cs 23 Nov 2005 15:28:28 -0000 1.10 --- AjaxCallHelper.cs 27 Nov 2005 17:28:26 -0000 1.11 *************** *** 41,60 **** get { ! if (HttpContext.Current.Items.Contains("_sbWritingLevels")) ! { ! return (ArrayList)(HttpContext.Current.Items["_sbWritingLevels"]); ! } ! return null; } set { ! if (!HttpContext.Current.Items.Contains("_sbWritingLevels")) ! { ! HttpContext.Current.Items.Add("_sbWritingLevels", value); ! } ! else ! { ! HttpContext.Current.Items["_sbWritingLevels"] = value; ! } } } --- 41,49 ---- get { ! return (ArrayList)(HttpContext.Current.Items["_sbWritingLevels"]); } set { ! HttpContext.Current.Items["_sbWritingLevels"] = value; } } *************** *** 71,82 **** set { ! if (!HttpContext.Current.Items.Contains("_writingLevel")) ! { ! HttpContext.Current.Items.Add("_writingLevel", value); ! } ! else ! { ! HttpContext.Current.Items["_writingLevel"] = value; ! } } } --- 60,64 ---- set { ! HttpContext.Current.Items["_writingLevel"] = value; } } Index: MagicAjaxContext.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxContext.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MagicAjaxContext.cs 24 Nov 2005 13:13:04 -0000 1.5 --- MagicAjaxContext.cs 27 Nov 2005 17:28:26 -0000 1.6 *************** *** 208,216 **** { // get the portal context for the current HTTP request ! if (HttpContext.Current.Items.Contains("__MAGICAJAXCONTEXT")) ! { ! magicAjaxContext = (MagicAjaxContext)HttpContext.Current.Items["__MAGICAJAXCONTEXT"]; ! } ! else { // create a new context and add it to the items collection for later retrieval --- 208,213 ---- { // get the portal context for the current HTTP request ! magicAjaxContext = (MagicAjaxContext)HttpContext.Current.Items["__MAGICAJAXCONTEXT"]; ! if ( magicAjaxContext == null ) { // create a new context and add it to the items collection for later retrieval |
From: Argiris K. <be...@us...> - 2005-11-26 14:51:02
|
Update of /cvsroot/magicajax/magicajax/Docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18983/Docs Modified Files: Features.html Integration.html Readme.html Added Files: Configuration.html Log Message: Added Docs stuff. Index: Readme.html =================================================================== RCS file: /cvsroot/magicajax/magicajax/Docs/Readme.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Readme.html 25 Nov 2005 00:04:50 -0000 1.1 --- Readme.html 26 Nov 2005 14:50:54 -0000 1.2 *************** *** 71,74 **** --- 71,76 ---- <p class="MainContent">Documentation on the various configuration options that give you full control of MagicAjax's internal workings.</p> + <p class="NewsDate"><A href="Limitations.html">Limitations</A></p> + <p class="MainContent">The currently known limitations of MagicAjax.</p> <p class="MainHeader" align="left">Keeping Up To Date</p> <p align="left">The best place to keep up to date with developments on MagicAjax is --- NEW FILE: Configuration.html --- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>MagicAjax.NET Readme</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .MainHeader { font-weight: bold; color: white; background-color: #0066cc; font-size: 10pt} body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: black; background-color: white} .BorderHeader { background-color: #999900; font-size: 8pt; font-weight: bold; color: #333300; text-align: center} .MainContent { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: black } .BorderContent { font-size: 8pt; color: black; border-color: black #666600 #666600; padding-top: 2px; padding-right: 2px; padding-bottom: 10px; padding-left: 2px; margin-bottom: 2px; border-style: solid; border-top-width: 0px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px} a:link { color: #000099; text-decoration: underline} a:hover { color: #000099; text-decoration: underline} a:visited { color: #000099; text-decoration: underline} li { color: black; list-style-type: circle; position: relative; left: -15px; clip: rect( )} .NewsDate { color: black; font-weight: bold; font-size: 11pt} td { font-size: 10pt} th { font-size: 10pt} .Annotation { font-size: 10px} H1 { text-align: center; } A.qindex {} A.qindexRef {} A.el { text-decoration: none; font-weight: bold } A.elRef { font-weight: bold } A.code { text-decoration: none; font-weight: normal; color: #4444ee } A.codeRef { font-weight: normal; color: #4444ee } DL.el { margin-left: -1cm } DIV.fragment { width: 100%; border: none; background-color: #003300 } DIV.ah { background-color: black; margin-bottom: 3; margin-top: 3 } TD.md { background-color: #006600 } DIV.groupHeader { margin-left: 16; margin-top: 12; margin-bottom: 6; font-weight: bold } DIV.groupText { margin-left: 16; font-style: italic; font-size: smaller } FONT.keyword { color: #008000 } FONT.keywordtype { color: #999920 } FONT.keywordflow { color: #e0FF00 } FONT.comment { color: #009900 } FONT.preprocessor { color: #809020 } FONT.stringliteral { color: #002080 } FONT.charliteral { color: #008080 } H3 { FONT-FAMILY: trebuchet ms,helvetica,arial } .ex { FONT-SIZE: 8pt; FONT-FAMILY: tahoma } CODE.keywordtype { COLOR: #00ccff } CODE.keyword { FONT-WEIGHT: bold; COLOR: #00ccff } CODE.fn { COLOR: white; FONT-WEIGHT: bold; } CODE.var { COLOR: #dcdcdc; } CODE.macro { COLOR: #809020; FONT-WEIGHT: bold; } CODE.comm { COLOR: lime } CODE.num { COLOR: purple } CODE.str { COLOR: #ffcc33; font-style: italic } .SectionHeader { font-size: 14px; color: #FFFFCC; font-weight: bold} .header { font-size: 16px; font-weight: bold; color: #663399} --></style> </head> <body text="#000000" bgColor="#ffffff"> <p class="header" align="center">MagicAjax.NET Framework</p> <P class="header" align="center">Configuration</P> <p class="MainHeader" align="left">Table of Contents</p> <UL> <LI> Setting configuration options <ul> <li> <A href="#webconfig">Web.config</A> <li> <A href="#bycode">By code</A> </li> </ul> <LI> Configuration options <ul> <LI> <A href="#scriptPath">ScriptPath</A> <li> <A href="#OutputCompareMode">OutputCompareMode</A> <LI> <A href="#tracing">Tracing</A> <li> PageStore <ul> <li> <A href="#Mode">Mode</A> <li> <A href="#UnloadStoredPage">UnloadStoredPage</A> <li> <A href="#CacheTimeout">CacheTimeout</A> <li> <A href="#MaxConcurrentPages">MaxConcurrentPages</A> <li> <A href="#MaxPagesLimitAlert">MaxPagesLimitAlert</A> </li> </ul> </li> </ul> </LI> </UL> <p class="MainHeader" align="left">Setting Configuration Options</p> <p class="NewsDate"><a name="webconfig"></a>Web.config</p> <p class="MainContent">You can set the configuration options for MagicAjax inside web.config's <i>configuration</i> section. The options will be applied to all the pages of your application that use MagicAjax. If you ommit an option from web.config, MagicAjax will use its default setting. A sample of MagicAjax's default configuration options is this: <P class="MainContent">(<b>note:</b> There is a sample web.config file inside the 'Core' folder of the distribution with short descriptions for each available option) <pre> <configSections> <section name="magicAjax" type="MagicAjax.Configuration.MagicAjaxSectionHandler, MagicAjax"/> </configSections> <magicAjax outputCompareMode="HashCode" tracing="false"> <pageStore mode="NoStore" unloadStoredPage="false" cacheTimeout="5" maxConcurrentPages="5" maxPagesLimitAlert="false" /> </magicAjax></pre> <hr> <P></P> <p class="NewsDate"><a name="bycode"></a>By code</p> <p class="MainContent">The web.config MagicAjax settings can be overriden for a particular page, by code. The <b>MagicAjaxContext.Current.Configuration</b> property carries all the options and you can change any of them at the Load event of your page. Example: <pre> private void Page_Load(object sender, System.EventArgs e) { MagicAjaxContext.Current.Configuration.PageStore = MagicAjax.Configuration.PageStoreMode.Session; }</pre> Any changes you make to the configuration options by code will be stored in a hidden field of the page and will be restored for a PostBack/AjaxCall. Thus, the following example has the same effect as the previous: <pre> private void Page_Load(object sender, System.EventArgs e) { if ( !IsPostBack ) { MagicAjaxContext.Current.Configuration.PageStore = MagicAjax.Configuration.PageStoreMode.Session; } }</pre> <b>Note:</b> Configuration options can be changed during a PostBack, but changing them during an AjaxCall is not allowed and will throw an exception. <P></P> <p class="MainHeader" align="left">Configuration Options</p> <p class="NewsDate"><a name="scriptPath"></a>ScriptPath</p> <p class="MainContent"><b>Type:</b> string<br> <b>Default:</b> null (omitted)<br> <b>Description:</b> MagicAjax's script files are embedded in the dll and are put on page using script tags like this: <pre> <script type="text/javascript" src="AjaxCallObject.js.aspx"></script></pre> If you set ScriptPath to a value, the <i>src</i> attribute of the script tag will contain the path of ScriptPath. That way you can use your own modified versions of MagicAjax's script files. Example: <pre> <magicAjax ScriptPath="~/script" /></pre> <hr> <P></P> <p class="NewsDate">OutputCompareMode</p> <p class="MainContent"><b>Type:</b> enumeration (HashCode / MD5 / FullHtml)<br> <b>Default:</b> HashCode<br> <b>Description:</b> When an AjaxCall is invoked, MagicAjax compares the previous html rendering of controls included in an AjaxPanel with the current one, to see if changes occured. Instead of keeping the complete html string, MagicAjax produces 'fingerprints' of the html rendering strings to compare them. When 'NoStore' PageStore mode is selected, the fingerprints are kept on page in hidden fields. This option defines how the fingerprints are going to be produced: <P class="MainContent"><b>HashCode:</b> The String.GetHashCode() method is used. This produces the smaller in size fingerprints but with the bigger chance for collisions. <P class="MainContent"><b>MD5:</b> MD5 hashing is used. It is slower and larger in size, but practically there is no chance for collisions. <P class="MainContent"><b>FullHtml:</b> The full html rendering is kept. This is provided only for debugging purposes. <hr> <P></P> <p class="NewsDate"><a name="Tracing"></a>Tracing</p> <p class="MainContent"><b>Type:</b> boolean<br> <b>Default:</b> false<br> <b>Description:</b> If tracing is enabled, when an AjaxCall is invoked, a tracing window is created that displays the information about the data that were sent by the client to the server as POST data and the javascript code that the client received as a response from the server. That way you can monitor the traffic of AjaxCalls for debugging purposes or to find a page setup with less AJAX traffic. <hr> <P></P> <p class="NewsDate"><a name="Mode"></a>PageStore - Mode</p> <p class="MainContent"><b>Type:</b> enumeration (NoStore / Session / Cache)<br> <b>Default:</b> NoStore<br> <b>Description:</b> This is the option that has the most impact on how MagicAjax is going to function and to the page's execution cycle. Study the different modes carefully before deciding which one suits the needs of your application. <P class="MainContent"><b>NoStore</b> : The default and recommended PageStore mode. The page's execution cycle for an AjaxCall is the same as a PostBack. The page and its controls are recreated at each AjaxCall, nothing is kept on the server, and the ASP.NET control events (Load, Unload etc.) are raised. This mode works for both NET 1.1 and NET 2.0. <P class="MainContent"><b>Session</b> : The page object of the request is stored at the server in Session, and MagicAjax raises the various events on the stored page object. This mode bypasses the ASP.NET Page execution cycle; the control events (Init, Load, PreRender, Unload) are not raised but instead MagicAjax's stored page events are raised (AjaxCall, PreWriteScript, AjaxCallEnd) and the PostBack events of controls (Click, SelectedIndexChanged, CheckChanged etc.) <P class="MainContent">In order to handle the stored page events you need to implement the appropriate interfaces (IAjaxCallEventHandler, IPreWriteScriptEventHandler) on your Page/Usercontrol/Custom control class, or use AjaxPage/AjaxUserControl (see <A href="Usage.html#AjaxPage">Usage</A> ). <P class="MainContent">This mode offers better performance than 'NoStore' and less AJAX traffic, at the expense of consuming server's memory. Also, keeping the page object 'alive' has the benefit that any control that gets created during an AjaxCall, will be available during the next AjaxCall. For example, if you wanted to have a button that every time it is clicked, a new checkbox is added in a panel, here's how you can do it with an AjaxPanel and 'Session' mode: <pre> private void Button1_Click(object sender, System.EventArgs e) { CheckBox check = new CheckBox(); check.Text = "Checkbox" + AjaxPanel1.Controls.Count; AjaxPanel1.Controls.Add (check); }</pre> On the other hand, if you wanted to do the same with a normal PostBack or 'NoStore' mode, you would have to implement code that keeps track of the created CheckBoxs and recreate them at the Load event. The 'alive' page object can be programmed almost like a desktop application form. <P></P> <P class="MainContent">This mode has drawbacks that you must consider: <ul> <li> It works only with 'InProc' Session state mode; it will not work with 'StateServer' or 'SQLServer' Session state modes. <li> It is supported only for NET 1.1 <li> HtmlAnchor and HtmlImage controls loose their attributes during an AjaxCall; AjaxHtmlAnchor and AjaxHtmlImage should be used in their place. (see <A href="Usage.html#AjaxHtml"> Usage</A>) </li> </ul> <P class="MainContent"><b>Cache:</b> This mode works like 'Session' with the only difference being that the page object is stored in server's Cache, so the 'StateServer' and 'SQLServer' Session state modes can be used.</P> <P></P> <P> <hr> <P></P> <P></P> <p class="NewsDate"><a name="UnloadStoredPage"></a>PageStore - UnloadStoredPage</p> <p class="MainContent"><b>Type:</b> boolean<br> <b>Default:</b> false<br> <b>Description:</b> (Applicable only to <b>Session/Cache</b> PageStore modes) If the page object is stored (Session/Cache PageStore modes), this option defines whether the stored page object should be dropped when the browser's page is unloaded (when the user closes the window, navigates to another page, etc.). If it is enabled, an invisible AjaxCall is invoked at the Unload event of the browser's page, requesting that the server should drop the page object immediately. Although this can reduce a bit the memory consumption of page storing modes, it has the drawback that the page's state is not kept in browser's cache, so if the user returns to the MagicAjax-enabled page using the browser's Back button, the page will not have kept any AJAX changes and the user will see the initial page before any AjaxCalls were invoked. <hr> <P></P> <p class="NewsDate"><a name="CacheTimeout"></a>PageStore - CacheTimeout</p> <p class="MainContent"><b>Type:</b> integer<br> <b>Default:</b> 5<br> <b>Description:</b> (Applicable only to <b>Cache</b> PageStore mode) Defines the time in minutes that the page object will be kept in server's Cache, if Cache PageStore mode is selected. <hr> <P></P> <p class="NewsDate"><a name="MaxConcurrentPages"></a>PageStore - MaxConcurrentPages</p> <p class="MainContent"><b>Type:</b> integer<br> <b>Default:</b> 5<br> <b>Description:</b> (Applicable only to <b>Session/Cache</b> PageStore modes) Every new page request creates a new page object on the server. MagicAjax distinguishes page objects based on the user's session id and the requested page. If the user opens, in his session, the same page more than once, MagicAjax stores the page objects that belong to the same page and session, but only until MaxConcurrentPages limit is reached. If the limit is reached and the user requests the same page in his session, MagicAjax will not store the new page object, but instead it will find the page object that was accessed less recently and use this for the new page request as well. <P class="MainContent">If the MaxConcurrentPages limit didn't exist, a new page object would have to be created and stored on the server every time the 'Refresh' button of the client's browser was clicked. <hr> <P></P> <p class="NewsDate"><a name="MaxPagesLimitAlert"></a>PageStore - MaxPagesLimitAlert</p> <p class="MainContent"><b>Type:</b> boolean<br> <b>Default:</b> false<br> <b>Description:</b> (Applicable only to <B>Session/Cache</B> PageStore modes) If this option is true, when a page request by the user reaches the <b>MaxConcurrentPages</b> limit, a notification alert box appears. Provided mainly for debugging purposes. <hr> <P></P> <P class="MainHeader" align="left"> </P> <P>Copyright © 2005 by The MagicAjax.NET Team</P> </body> </html> Index: Integration.html =================================================================== RCS file: /cvsroot/magicajax/magicajax/Docs/Integration.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Integration.html 25 Nov 2005 00:04:50 -0000 1.1 --- Integration.html 26 Nov 2005 14:50:54 -0000 1.2 *************** *** 79,83 **** For more information about the controls of the framework see <A href="Usage.html">Usage</A> <P></P> ! <p class="NewsDate">Putting the controls in Toolbox</p> <p class="MainContent"> It is recommended that you put the controls of MagicAjax in toolbox so that you --- 79,83 ---- For more information about the controls of the framework see <A href="Usage.html">Usage</A> <P></P> ! <p class="NewsDate">Putting the controls in Toolbox (Visual Studio .NET 2003)</p> <p class="MainContent"> It is recommended that you put the controls of MagicAjax in toolbox so that you Index: Features.html =================================================================== RCS file: /cvsroot/magicajax/magicajax/Docs/Features.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Features.html 25 Nov 2005 00:04:50 -0000 1.1 --- Features.html 26 Nov 2005 14:50:54 -0000 1.2 *************** *** 84,93 **** adding AjaxPanels and without even a single change in the source code <LI> ! MagicAjax replaces PostBacks with AjaxCalls that do not cause a refresh on the ! client's browser <LI> The PostBack and AJAX functionality can co-exist in the same page; only the controls that are inside an AjaxPanel will perform an AjaxCall instead of a PostBack <li> You handle an AjaxCall just like a PostBack, using the ASP.NET server-side --- 84,96 ---- adding AjaxPanels and without even a single change in the source code <LI> ! MagicAjax replaces PostBacks with AJAX callbacks (AjaxCalls) that do not cause ! a refresh on the client's browser <LI> The PostBack and AJAX functionality can co-exist in the same page; only the controls that are inside an AjaxPanel will perform an AjaxCall instead of a PostBack + <LI> + The page's ViewState is shared amongst PostBacks and AjaxCalls; any changes to + it by an AjaxCall will be available to a PostBack and vice versa <li> You handle an AjaxCall just like a PostBack, using the ASP.NET server-side *************** *** 95,100 **** <li> MagicAjax intuitively spots the changes that occured during an AjaxCall and ! sends the required javascript that will reflect the changes on the client's ! browser <LI> There are plenty of helper methods to help you with handling an AjaxCall by --- 98,103 ---- <li> MagicAjax intuitively spots the changes that occured during an AjaxCall and ! sends the minimum possible required javascript that will reflect the changes on ! the client's browser <LI> There are plenty of helper methods to help you with handling an AjaxCall by *************** *** 110,115 **** A 'Loading' label notifies the user that an AjaxCall has been invoked <li> ! Instead of downloading the whole page for a Postback, the client only downloads ! chunks of javascript code that apply the changes made to the page's html</li> </UL> <p class="NewsDate">Customization</p> --- 113,122 ---- A 'Loading' label notifies the user that an AjaxCall has been invoked <li> ! Instead of downloading the whole page for a Postback, the client only downloads ! chunks of javascript code that apply the changes made to the page's html ! <LI> ! MagicAjax's changes to the page are kept in the browser's cache, so if the user ! navigates to another page and then presses the browser's 'Back' button, he will ! see the same page that he was viewing before</LI> </UL> <p class="NewsDate">Customization</p> |
From: Argiris K. <be...@us...> - 2005-11-26 12:14:55
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Controls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26744/Core/UI/Controls Modified Files: AjaxPanel.cs Log Message: Fixed a serious flaw of the AjaxPanel mechanism. Now only children that are webcontrols are enclosed inside an additional span tag. Literal content and HtmlControls are rendered together. Index: AjaxPanel.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxPanel.cs,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** AjaxPanel.cs 25 Nov 2005 20:45:47 -0000 1.23 --- AjaxPanel.cs 26 Nov 2005 12:14:41 -0000 1.24 *************** *** 265,277 **** protected override void AddedControl(Control control, int index) { ! if ( IsPageNoStoreMode ) { ! // If the ID of the added control is null, find a unique id manually, ! // or else the default naming order may cause mismatches. ! if (control.ID == null || control.ID == String.Empty) ! control.ID = FindUniqueID(); } - _addedControls.Add (control); base.AddedControl (control, index); } --- 265,281 ---- protected override void AddedControl(Control control, int index) { ! if ( control is WebControl ) { ! if ( IsPageNoStoreMode ) ! { ! // If the ID of the added control is null, find a unique id manually, ! // or else the default naming order may cause mismatches. ! if (control.ID == null || control.ID == String.Empty) ! control.ID = FindUniqueID(); ! } ! ! _addedControls.Add (control); } base.AddedControl (control, index); } *************** *** 286,293 **** protected override void RemovedControl(Control control) { ! if (_addedControls.Contains(control)) ! _addedControls.Remove (control); ! else ! _removedControls.Add (control); base.RemovedControl (control); --- 290,300 ---- protected override void RemovedControl(Control control) { ! if ( control is WebControl ) ! { ! if (_addedControls.Contains(control)) ! _addedControls.Remove (control); ! else ! _removedControls.Add (control); ! } base.RemovedControl (control); *************** *** 311,333 **** HtmlTextWriter litewriter = new HtmlTextWriter(new System.IO.StringWriter(sb)); for (int i=0; i < Controls.Count; i++) { Control con = Controls[i]; ! writer.WriteBeginTag ("span"); ! writer.WriteAttribute ("id", GetAjaxElemID(con)); ! writer.Write (HtmlTextWriter.TagRightChar); ExtendedRenderControl (con, fullwriter, litewriter); writer.Write (sbFull.ToString()); ! _controlHtmlFingerprints[con] = Util.GetFingerprint(sb.ToString()); sbFull.Length = 0; sb.Length = 0; - - writer.WriteEndTag ("span"); } _addedControls.Clear(); _removedControls.Clear(); --- 318,365 ---- HtmlTextWriter litewriter = new HtmlTextWriter(new System.IO.StringWriter(sb)); + StringBuilder sbLiteral = new StringBuilder(); + HtmlTextWriter literalwriter = new HtmlTextWriter(new System.IO.StringWriter(sbLiteral)); + for (int i=0; i < Controls.Count; i++) { Control con = Controls[i]; ! // Put inside span tag only WebControls ! bool isWebControl = ( con is WebControl ); ! ! if ( isWebControl ) ! { ! writer.WriteBeginTag ("span"); ! writer.WriteAttribute ("id", GetAjaxElemID(con)); ! writer.WriteAttribute ("name", "__ajaxmark"); ! writer.Write (HtmlTextWriter.TagRightChar); ! ! literalwriter.WriteBeginTag ("span"); ! literalwriter.WriteAttribute ("id", GetAjaxElemID(con)); ! literalwriter.WriteAttribute ("name", "__ajaxmark"); ! literalwriter.Write (HtmlTextWriter.TagRightChar); ! } ExtendedRenderControl (con, fullwriter, litewriter); writer.Write (sbFull.ToString()); + string html = sb.ToString(); ! if ( isWebControl ) ! { ! _controlHtmlFingerprints[con] = Util.GetFingerprint(html); ! writer.WriteEndTag ("span"); ! literalwriter.WriteEndTag ("span"); ! } ! else ! { ! literalwriter.Write (html); ! } sbFull.Length = 0; sb.Length = 0; } + _controlState.LiteralFingerprint = Util.GetFingerprint(sbLiteral.ToString()); + _addedControls.Clear(); _removedControls.Clear(); *************** *** 438,441 **** --- 470,476 ---- HtmlTextWriter fullwriter = new HtmlTextWriter(new System.IO.StringWriter(sbFull)); + StringBuilder sbLiteral = new StringBuilder(); + HtmlTextWriter literalwriter = new HtmlTextWriter(new System.IO.StringWriter(sbLiteral)); + // To be used in 'NoStore' mode to continue the rendering of control tree. HtmlTextWriter nullWriter = new HtmlTextWriter(System.IO.TextWriter.Null); *************** *** 451,462 **** Control con = Controls[i]; ! fullwriter.WriteBeginTag ("span"); ! fullwriter.WriteAttribute ("id", GetAjaxElemID(con)); ! fullwriter.Write (HtmlTextWriter.TagRightChar); ExtendedRenderControl (con, fullwriter, litewriter, true); - fullwriter.WriteEndTag ("span"); - _controlHtmlFingerprints[con] = Util.GetFingerprint(sb.ToString()); sb.Length = 0; } --- 486,519 ---- Control con = Controls[i]; ! // Put inside span tag only WebControls ! bool isWebControl = ( con is WebControl ); ! ! if ( isWebControl ) ! { ! fullwriter.WriteBeginTag ("span"); ! fullwriter.WriteAttribute ("id", GetAjaxElemID(con)); ! fullwriter.WriteAttribute ("name", "__ajaxmark"); ! fullwriter.Write (HtmlTextWriter.TagRightChar); ! ! literalwriter.WriteBeginTag ("span"); ! literalwriter.WriteAttribute ("id", GetAjaxElemID(con)); ! literalwriter.WriteAttribute ("name", "__ajaxmark"); ! literalwriter.Write (HtmlTextWriter.TagRightChar); ! } ExtendedRenderControl (con, fullwriter, litewriter, true); + string html = sb.ToString(); + + if ( isWebControl ) + { + fullwriter.WriteEndTag ("span"); + literalwriter.WriteEndTag ("span"); + _controlHtmlFingerprints[con] = Util.GetFingerprint(html); + } + else + { + literalwriter.Write (html); + } sb.Length = 0; } *************** *** 467,477 **** AjaxCallHelper.WriteSetHtmlOfElementScript (html, ClientID); } } else { foreach (Control con in _removedControls) { _controlHtmlFingerprints.Remove(con); - AjaxCallHelper.WriteRemoveElementScript (ClientID, GetAjaxElemID(ClientID + "_" + con.ClientID)); } --- 524,539 ---- AjaxCallHelper.WriteSetHtmlOfElementScript (html, ClientID); } + + _controlState.LiteralFingerprint = Util.GetFingerprint(sbLiteral.ToString()); } else { + // Increase script writing level because we want literal content to + // be rendered before the child controls renderings + AjaxCallHelper.IncreaseWritingLevel(); + foreach (Control con in _removedControls) { _controlHtmlFingerprints.Remove(con); } *************** *** 480,487 **** Control con = Controls[i]; string html; sbFull.Length = sb.Length = 0; ! if (_addedControls.Contains(con)) { // It's a new control, create it on the client at the appropriate place. --- 542,561 ---- Control con = Controls[i]; + // Only WebControls are inside a span tag + bool isWebControl = ( con is WebControl ); + + if ( isWebControl ) + { + literalwriter.WriteBeginTag ("span"); + literalwriter.WriteAttribute ("id", GetAjaxElemID(con)); + literalwriter.WriteAttribute ("name", "__ajaxmark"); + literalwriter.Write (HtmlTextWriter.TagRightChar); + literalwriter.WriteEndTag ("span"); + } + string html; sbFull.Length = sb.Length = 0; ! if ( isWebControl && _addedControls.Contains(con) ) { // It's a new control, create it on the client at the appropriate place. *************** *** 489,493 **** html = sbFull.ToString(); ! AjaxCallHelper.WriteAddElementScript (ClientID, "span", GetAjaxElemID(con), html, GetNextExistingElement(i)); _controlHtmlFingerprints[con] = Util.GetFingerprint(sb.ToString()); --- 563,567 ---- html = sbFull.ToString(); ! AjaxCallHelper.WriteSetHtmlOfElementScript (html, GetAjaxElemID(con)); _controlHtmlFingerprints[con] = Util.GetFingerprint(sb.ToString()); *************** *** 507,517 **** html = sb.ToString(); - string htmlFingerprint = Util.GetFingerprint(html); ! // If it's html rendering fingerprint is the same, ignore it. ! if (htmlFingerprint != (string)_controlHtmlFingerprints[con]) { ! ExtendedWriteSetHtmlOfElementScript(html, GetAjaxElemID(con)); ! _controlHtmlFingerprints[con] = htmlFingerprint; } --- 581,599 ---- html = sb.ToString(); ! if ( isWebControl ) { ! string htmlFingerprint = Util.GetFingerprint(html); ! ! // If it's html rendering fingerprint is the same, ignore it. ! if (htmlFingerprint != (string)_controlHtmlFingerprints[con]) ! { ! ExtendedWriteSetHtmlOfElementScript(html, GetAjaxElemID(con)); ! _controlHtmlFingerprints[con] = htmlFingerprint; ! } ! } ! else ! { ! literalwriter.Write (html); } *************** *** 522,525 **** --- 604,619 ---- } } + + AjaxCallHelper.DecreaseWritingLevel(); + + string literalhtml = sbLiteral.ToString(); + string literalFingerprint = Util.GetFingerprint(literalhtml); + if ( _controlState.LiteralFingerprint != literalFingerprint ) + { + ExtendedWriteSetHtmlOfElementScript (literalhtml, this.ClientID); + _controlState.LiteralFingerprint = Util.GetFingerprint(literalhtml); + } + + AjaxCallHelper.MergeUpperWritingLevelsWithCurrent(); } *************** *** 602,606 **** /// <summary> /// It's part of the ExtendedRenderControl(Control control) method. It replaces the html rendering ! /// of a RenderedByScriptControl with a Span tag named "__ajax_rbs". /// </summary> /// <param name="sender"></param> --- 696,700 ---- /// <summary> /// It's part of the ExtendedRenderControl(Control control) method. It replaces the html rendering ! /// of a RenderedByScriptControl with a Span tag named "__ajaxmark". /// </summary> /// <param name="sender"></param> *************** *** 609,613 **** { RenderedByScriptControl con = (RenderedByScriptControl) sender; ! e.Writer.Write ("<span id=\"{0}$rbs\" name=\"__ajax_rbs\"></span>", con.ClientID); e.AbortRendering = true; } --- 703,707 ---- { RenderedByScriptControl con = (RenderedByScriptControl) sender; ! e.Writer.Write ("<span id=\"{0}$rbs\" name=\"__ajaxmark\"></span>", con.ClientID); e.AbortRendering = true; } *************** *** 831,834 **** --- 925,929 ---- private class ControlCollectionState { + private string _literalFingerprint; private SortedList _controlHtmlFingerprints; private Control _owner; *************** *** 847,853 **** /// </summary> /// <param name="controlHtmlFingerprints"></param> ! public ControlCollectionState(SortedList controlHtmlFingerprints, Control owner) { _owner = owner; _controlHtmlFingerprints = controlHtmlFingerprints; } --- 942,949 ---- /// </summary> /// <param name="controlHtmlFingerprints"></param> ! public ControlCollectionState(string literalFingerprint, SortedList controlHtmlFingerprints, Control owner) { _owner = owner; + _literalFingerprint = literalFingerprint; _controlHtmlFingerprints = controlHtmlFingerprints; } *************** *** 865,872 **** { SortedList controlHtmlFingerprints = new SortedList(); if (panelControlFingerprints != String.Empty) { string[] namevaluepairs = panelControlFingerprints.Split(';'); ! for (int i = 0; i < namevaluepairs.Length; i++) { string namevaluepair = namevaluepairs[i]; --- 961,979 ---- { SortedList controlHtmlFingerprints = new SortedList(); + string literalFingerprint = null; + if (panelControlFingerprints != String.Empty) { string[] namevaluepairs = panelControlFingerprints.Split(';'); ! if (MagicAjaxContext.Current.Configuration.CompareMode == MagicAjax.Configuration.OutputCompareMode.FullHtml) ! { ! literalFingerprint = UnicodeEncoding.Default.GetString(Convert.FromBase64String(namevaluepairs[0])); ! } ! else ! { ! literalFingerprint = namevaluepairs[0]; ! } ! ! for (int i = 1; i < namevaluepairs.Length; i++) { string namevaluepair = namevaluepairs[i]; *************** *** 884,888 **** } ! return new ControlCollectionState(controlHtmlFingerprints, owner); } else --- 991,995 ---- } ! return new ControlCollectionState(literalFingerprint, controlHtmlFingerprints, owner); } else *************** *** 902,905 **** --- 1009,1018 ---- } + public string LiteralFingerprint + { + get { return _literalFingerprint; } + set { _literalFingerprint = value; } + } + public System.Collections.SortedList ControlHtmlFingerprints { *************** *** 924,933 **** System.Text.StringBuilder sbuilder = new System.Text.StringBuilder(); foreach (string key in _controlHtmlFingerprints.Keys) { ! if (_controlHtmlFingerprints.IndexOfKey(key) > 0) ! { ! sbuilder.Append(';'); ! } string keyWithoutNamingcontainer = key.Substring(panelClientID.Length + 1); --- 1037,1053 ---- System.Text.StringBuilder sbuilder = new System.Text.StringBuilder(); + // Put the literal content first, before the control/fingerprint pairs + if (MagicAjaxContext.Current.Configuration.CompareMode == MagicAjax.Configuration.OutputCompareMode.FullHtml) + { + sbuilder.Append (Convert.ToBase64String(UnicodeEncoding.Default.GetBytes(LiteralFingerprint))); + } + else + { + sbuilder.Append (LiteralFingerprint); + } + foreach (string key in _controlHtmlFingerprints.Keys) { ! sbuilder.Append(';'); string keyWithoutNamingcontainer = key.Substring(panelClientID.Length + 1); *************** *** 987,991 **** { RenderedByScriptControl con = (RenderedByScriptControl) sender; ! Write ("<span id=\"{0}$rbs\" name=\"__ajax_rbs\">", con.ClientID); onlyFullRender = true; } --- 1107,1111 ---- { RenderedByScriptControl con = (RenderedByScriptControl) sender; ! Write ("<span id=\"{0}$rbs\" name=\"__ajaxmark\">", con.ClientID); onlyFullRender = true; } |
From: Argiris K. <be...@us...> - 2005-11-26 12:14:55
|
Update of /cvsroot/magicajax/magicajax/Core/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26744/Core/script Modified Files: AjaxCallObject.js Log Message: Fixed a serious flaw of the AjaxPanel mechanism. Now only children that are webcontrols are enclosed inside an additional span tag. Literal content and HtmlControls are rendered together. Index: AjaxCallObject.js =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/script/AjaxCallObject.js,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** AjaxCallObject.js 25 Nov 2005 21:30:26 -0000 1.25 --- AjaxCallObject.js 26 Nov 2005 12:14:41 -0000 1.26 *************** *** 627,631 **** { var elem = spans[i]; ! if (elem.getAttribute("name") == "__ajax_rbs") { var elemOnPage = document.getElementById(elem.id); --- 627,631 ---- { var elem = spans[i]; ! if (elem.getAttribute("name") == "__ajaxmark") { var elemOnPage = document.getElementById(elem.id); |
From: Argiris K. <be...@us...> - 2005-11-25 21:41:37
|
Update of /cvsroot/magicajax/magicajax/Core/Configuration In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17745/Core/Configuration Modified Files: MagicAjaxConfiguration.cs Log Message: Forgot to change something when moving OutputCompareMode. Index: MagicAjaxConfiguration.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/Configuration/MagicAjaxConfiguration.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MagicAjaxConfiguration.cs 25 Nov 2005 20:45:47 -0000 1.8 --- MagicAjaxConfiguration.cs 25 Nov 2005 21:41:27 -0000 1.9 *************** *** 367,370 **** --- 367,389 ---- } + attrib = (XmlAttribute)xml.Attributes.GetNamedItem("outputCompareMode"); + if (attrib != null) + { + switch (attrib.Value.ToLower()) + { + case "hashcode": + _compareMode = OutputCompareMode.HashCode; + break; + case "md5": + _compareMode = OutputCompareMode.MD5; + break; + case "fullhtml": + _compareMode = OutputCompareMode.FullHtml; + break; + default: + throw new ConfigurationException("MagicAjax configuration: value for outputCompareMode must be \"HashCode\" or \"MD5\" or \"FullHtml\"."); + } + } + attrib = (XmlAttribute)xml.Attributes.GetNamedItem("tracing"); if (attrib != null) *************** *** 455,477 **** } } - - attrib = (XmlAttribute)pageStore.Attributes.GetNamedItem("outputCompareMode"); - if (attrib != null) - { - switch (attrib.Value.ToLower()) - { - case "hashcode": - _compareMode = OutputCompareMode.HashCode; - break; - case "md5": - _compareMode = OutputCompareMode.MD5; - break; - case "fullhtml": - _compareMode = OutputCompareMode.FullHtml; - break; - default: - throw new ConfigurationException("MagicAjax configuration: value for outputCompareMode must be \"HashCode\" or \"MD5\" or \"FullHtml\"."); - } - } } --- 474,477 ---- |
From: Argiris K. <be...@us...> - 2005-11-25 21:30:37
|
Update of /cvsroot/magicajax/magicajax/Core/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15955/Core/script Modified Files: AjaxCallObject.js Log Message: RBS_Control_Store fields are registered on PreRender instead of Load event, to avoid some javascript errors when an AjaxPanel starts invisible. The error html reported by the server is put on page using document.write. Index: AjaxCallObject.js =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/script/AjaxCallObject.js,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** AjaxCallObject.js 25 Nov 2005 12:29:15 -0000 1.24 --- AjaxCallObject.js 25 Nov 2005 21:30:26 -0000 1.25 *************** *** 405,411 **** this.CloseTrace(); ! if (waitElement) ! waitElement.style.visibility = 'hidden'; ! document.forms[0].innerHTML = responseText; } --- 405,414 ---- this.CloseTrace(); ! if (waitElement) ! waitElement.style.visibility = 'hidden'; ! ! document.close(); // for IE ! document.write(responseText); ! document.close(); // for Firefox } |
From: Argiris K. <be...@us...> - 2005-11-25 21:30:34
|
Update of /cvsroot/magicajax/magicajax/Core/UI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15955/Core/UI Modified Files: RenderedByScriptControl.cs Log Message: RBS_Control_Store fields are registered on PreRender instead of Load event, to avoid some javascript errors when an AjaxPanel starts invisible. The error html reported by the server is put on page using document.write. Index: RenderedByScriptControl.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/RenderedByScriptControl.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** RenderedByScriptControl.cs 23 Nov 2005 19:34:23 -0000 1.12 --- RenderedByScriptControl.cs 25 Nov 2005 21:30:26 -0000 1.13 *************** *** 182,189 **** } ! protected override void OnLoad(EventArgs e) { - base.OnLoad (e); - if (!IsChildOfRenderedByScriptControl(this)) { --- 182,187 ---- } ! protected override void OnPreRender(EventArgs e) { if (!IsChildOfRenderedByScriptControl(this)) { *************** *** 211,214 **** --- 209,214 ---- Page.RegisterArrayDeclaration("RBS_Controls_Store", String.Format("document.forms[0][\"{0}\"]", hiddenStore)); } + + base.OnPreRender (e); } |
From: Argiris K. <be...@us...> - 2005-11-25 20:45:59
|
Update of /cvsroot/magicajax/magicajax/Core/Configuration In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7932/Core/Configuration Modified Files: MagicAjaxConfiguration.cs Log Message: Moved 'OutputCompareMode' to magicAjaxSection. Renamed 'AjaxCallScriptPath' to 'ScriptPath' since we are using it for other script files too. Index: MagicAjaxConfiguration.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/Configuration/MagicAjaxConfiguration.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MagicAjaxConfiguration.cs 24 Nov 2005 13:13:03 -0000 1.7 --- MagicAjaxConfiguration.cs 25 Nov 2005 20:45:47 -0000 1.8 *************** *** 33,37 **** private int _origMaxConcurrentPages; private bool _origMaxPagesLimitAlert; - private OutputCompareMode _origCompareMode; // active settings private PageStoreMode _mode; --- 33,36 ---- *************** *** 40,44 **** private int _maxConcurrentPages; private bool _maxPagesLimitAlert; - private OutputCompareMode _compareMode; #endregion --- 39,42 ---- *************** *** 143,166 **** } } - - public OutputCompareMode CompareMode - { - get { return _compareMode; } - set - { - if ( _isLocked && value != _compareMode ) - throw new MagicAjaxException("Configuration settings have been locked and cannot change."); - - if ( value != _origCompareMode ) - { - _compareMode = value; - _state["CompareMode"] = _compareMode; - } - else - { - _state.Remove("CompareMode"); - } - } - } #endregion --- 141,144 ---- *************** *** 205,211 **** MaxPagesLimitAlert = (bool) state[key]; break; - case "CompareMode": - CompareMode = (OutputCompareMode) state[key]; - break; case "UnloadStoredPage": UnloadStoredPage = (bool) state[key]; --- 183,186 ---- *************** *** 217,221 **** } ! public PageStore(PageStoreMode mode, bool unloadStoredPage, int cacheTimeout, int maxConcurrentPages, bool maxPagesLimitAlert, OutputCompareMode compareMode) { _state = new Hashtable(); --- 192,196 ---- } ! public PageStore(PageStoreMode mode, bool unloadStoredPage, int cacheTimeout, int maxConcurrentPages, bool maxPagesLimitAlert) { _state = new Hashtable(); *************** *** 225,229 **** _origMaxConcurrentPages = _maxConcurrentPages = maxConcurrentPages; _origMaxPagesLimitAlert = _maxPagesLimitAlert = maxPagesLimitAlert; - _origCompareMode = _compareMode = compareMode; _origUnloadStoredPage = _unloadStoredPage = unloadStoredPage; } --- 200,203 ---- *************** *** 242,248 **** --- 216,224 ---- // web.config settings private string _origScriptPath; + private OutputCompareMode _origCompareMode; private bool _origTracing; // active settings private string _scriptPath; + private OutputCompareMode _compareMode; private bool _tracing; #endregion *************** *** 269,272 **** --- 245,268 ---- } + public OutputCompareMode CompareMode + { + get { return _compareMode; } + set + { + if ( _isLocked && value != _compareMode ) + throw new MagicAjaxException("Configuration settings have been locked and cannot change."); + + if ( value != _origCompareMode ) + { + _compareMode = value; + _state["CompareMode"] = _compareMode; + } + else + { + _state.Remove("CompareMode"); + } + } + } + public bool Tracing { *************** *** 335,338 **** --- 331,337 ---- ScriptPath = (string) state[key]; break; + case "CompareMode": + CompareMode = (OutputCompareMode) state[key]; + break; case "Tracing": Tracing = (bool) state[key]; *************** *** 351,354 **** --- 350,354 ---- // Default values _scriptPath = null; // Null implicates that the embedded javascripts will be used (default) + _compareMode = OutputCompareMode.HashCode; _tracing = false; PageStoreMode mode = PageStoreMode.NoStore; *************** *** 357,365 **** int maxPages = 5; bool maxPagesLimitAlert = false; - OutputCompareMode compareMode = OutputCompareMode.HashCode; if (xml != null) { ! XmlAttribute attrib = (XmlAttribute)xml.Attributes.GetNamedItem("ajaxCallScriptPath"); if (attrib != null) { --- 357,364 ---- int maxPages = 5; bool maxPagesLimitAlert = false; if (xml != null) { ! XmlAttribute attrib = (XmlAttribute)xml.Attributes.GetNamedItem("scriptPath"); if (attrib != null) { *************** *** 463,473 **** { case "hashcode": ! compareMode = OutputCompareMode.HashCode; break; case "md5": ! compareMode = OutputCompareMode.MD5; break; case "fullhtml": ! compareMode = OutputCompareMode.FullHtml; break; default: --- 462,472 ---- { case "hashcode": ! _compareMode = OutputCompareMode.HashCode; break; case "md5": ! _compareMode = OutputCompareMode.MD5; break; case "fullhtml": ! _compareMode = OutputCompareMode.FullHtml; break; default: *************** *** 477,482 **** } ! _pageStore = new PageStore(mode, unloadStoredPage, cacheTimeout, maxPages, maxPagesLimitAlert, compareMode); _origScriptPath = _scriptPath; _origTracing = _tracing; } --- 476,482 ---- } ! _pageStore = new PageStore(mode, unloadStoredPage, cacheTimeout, maxPages, maxPagesLimitAlert); _origScriptPath = _scriptPath; + _origCompareMode = _compareMode; _origTracing = _tracing; } |