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-11-20 20:04:31
|
Update of /cvsroot/magicajax/magicajax/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24881/magicajax/Core Modified Files: MagicAjaxModule.cs Util.cs Web.config Log Message: Fingerprints are now configurable (default HashCode, MD5 or FullHtml). Now used for all modes (so not only NoStore). Index: Web.config =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/Web.config,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Web.config 18 Nov 2005 10:29:03 -0000 1.3 --- Web.config 20 Nov 2005 20:04:24 -0000 1.4 *************** *** 25,29 **** the maximum number of page objects that can refer to the same page. Default is 5. pageStore/maxPagesLimitAlert - if it's true, an alert box is displayed when the maxConcurrentPages ! limit is reached. Default is false --> <magicAjax> <pageStore --- 25,33 ---- the maximum number of page objects that can refer to the same page. Default is 5. pageStore/maxPagesLimitAlert - if it's true, an alert box is displayed when the maxConcurrentPages ! limit is reached. Default is false ! pageStore/outputCompareMode - "HashCode" : Use String.GetHashCode() to find changed Html output ! "MD5" : Use MD5 hashing to find changed Html output (slower, but practically no collisions) ! "FullHtml" : Use the complete Html output to find changes (for debugging purposes only) ! Default is "HashCode" --> <magicAjax> <pageStore *************** *** 33,36 **** --- 37,41 ---- maxConcurrentPages="5" maxPagesLimitAlert="false" + outputCompareMode="HashCode" /> </magicAjax> Index: Util.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/Util.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Util.cs 18 Nov 2005 10:29:03 -0000 1.3 --- Util.cs 20 Nov 2005 20:04:24 -0000 1.4 *************** *** 17,25 **** /// <param name="str"></param> /// <returns></returns> ! static public string GetBase64MD5Sum(string input) { ! byte[] inputBytes = UnicodeEncoding.Default.GetBytes(input); ! byte[] hashedBytes = new MD5CryptoServiceProvider().ComputeHash(inputBytes); ! return Convert.ToBase64String(hashedBytes); } --- 17,40 ---- /// <param name="str"></param> /// <returns></returns> ! static public string GetFingerprint(string input) { ! MagicAjax.Configuration.OutputCompareMode compareMode = MagicAjaxModule.Instance.Configuration.PageStore.CompareMode; ! switch (compareMode) ! { ! case MagicAjax.Configuration.OutputCompareMode.FullHtml: ! return input; ! break; ! case MagicAjax.Configuration.OutputCompareMode.HashCode: ! return input.GetHashCode().ToString("X2"); ! break; ! case MagicAjax.Configuration.OutputCompareMode.MD5: ! byte[] inputBytes = UnicodeEncoding.Default.GetBytes(input); ! byte[] hashedBytes = new MD5CryptoServiceProvider().ComputeHash(inputBytes); ! return Convert.ToBase64String(hashedBytes); ! break; ! default: ! return input; ! break; ! } } Index: MagicAjaxModule.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxModule.cs,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** MagicAjaxModule.cs 20 Nov 2005 08:47:29 -0000 1.18 --- MagicAjaxModule.cs 20 Nov 2005 20:04:24 -0000 1.19 *************** *** 677,684 **** Util.CallPrivateMethod (page, typeof(Page), "SetIntrinsics", _context); - #if NET_2_0 - Util.CallPrivateMethod(page, typeof(Page), "ProcessRequest"); - #endif - ReadOnlyArrayList postDataChangedControls; postDataChangedControls = new ReadOnlyArrayList(LoadFormDataOnChildren(page)); --- 677,680 ---- |
From: Dion O. <dol...@us...> - 2005-11-20 20:04:31
|
Update of /cvsroot/magicajax/magicajax/Core/Configuration In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24881/magicajax/Core/Configuration Modified Files: MagicAjaxConfiguration.cs Log Message: Fingerprints are now configurable (default HashCode, MD5 or FullHtml). Now used for all modes (so not only NoStore). Index: MagicAjaxConfiguration.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/Configuration/MagicAjaxConfiguration.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MagicAjaxConfiguration.cs 18 Nov 2005 10:29:04 -0000 1.3 --- MagicAjaxConfiguration.cs 20 Nov 2005 20:04:23 -0000 1.4 *************** *** 13,16 **** --- 13,23 ---- } + public enum OutputCompareMode + { + HashCode, + MD5, + FullHtml + } + public struct PageStore { *************** *** 20,23 **** --- 27,31 ---- private int _maxConcurrentPages; private bool _maxPagesLimitAlert; + private OutputCompareMode _compareMode; public PageStoreMode Mode *************** *** 46,50 **** } ! public PageStore(PageStoreMode mode, bool unloadStoredPage, int cacheTimeout, int maxConcurrentPages, bool maxPagesLimitAlert) { _mode = mode; --- 54,63 ---- } ! public OutputCompareMode CompareMode ! { ! get { return _compareMode; } ! } ! ! public PageStore(PageStoreMode mode, bool unloadStoredPage, int cacheTimeout, int maxConcurrentPages, bool maxPagesLimitAlert, OutputCompareMode compareMode) { _mode = mode; *************** *** 52,55 **** --- 65,69 ---- _maxConcurrentPages = maxConcurrentPages; _maxPagesLimitAlert = maxPagesLimitAlert; + _compareMode = compareMode; _unloadStoredPage = unloadStoredPage; } *************** *** 83,86 **** --- 97,101 ---- int maxPages = 5; bool maxPagesLimitAlert = false; + OutputCompareMode compareMode = OutputCompareMode.HashCode; if (xml != null) *************** *** 168,174 **** } } } ! _pageStore = new PageStore(mode, unloadStoredPage, cacheTimeout, maxPages, maxPagesLimitAlert); } } --- 183,208 ---- } } + + 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\"."); + } + } } ! _pageStore = new PageStore(mode, unloadStoredPage, cacheTimeout, maxPages, maxPagesLimitAlert, compareMode); } } |
From: Argiris K. <be...@us...> - 2005-11-20 15:21:45
|
Update of /cvsroot/magicajax/magicajax/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19391/Core Modified Files: MagicAjax NET 2.0.csproj MagicAjax.csproj Log Message: HtmlImage and HtmlAnchor are not working properly for Session/Cache. Added some inheriting controls that do. Index: MagicAjax NET 2.0.csproj =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjax NET 2.0.csproj,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MagicAjax NET 2.0.csproj 17 Nov 2005 15:03:16 -0000 1.6 --- MagicAjax NET 2.0.csproj 20 Nov 2005 15:21:31 -0000 1.7 *************** *** 142,145 **** --- 142,151 ---- <SubType>Code</SubType> </Compile> + <Compile Include="UI\Controls\AjaxHtmlAnchor.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="UI\Controls\AjaxHtmlImage.cs"> + <SubType>Code</SubType> + </Compile> <Compile Include="UI\Design\AjaxPanelDesigner.cs"> <SubType>Code</SubType> Index: MagicAjax.csproj =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjax.csproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MagicAjax.csproj 17 Nov 2005 15:03:16 -0000 1.3 --- MagicAjax.csproj 20 Nov 2005 15:21:32 -0000 1.4 *************** *** 188,191 **** --- 188,201 ---- /> <File + RelPath = "UI\Controls\AjaxHtmlAnchor.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "UI\Controls\AjaxHtmlImage.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "UI\Controls\AjaxPanel.cs" SubType = "Code" |
From: Argiris K. <be...@us...> - 2005-11-20 15:21:45
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Controls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19391/Core/UI/Controls Added Files: AjaxHtmlAnchor.cs AjaxHtmlImage.cs Log Message: HtmlImage and HtmlAnchor are not working properly for Session/Cache. Added some inheriting controls that do. --- NEW FILE: AjaxHtmlAnchor.cs --- using System; using System.Web.UI.HtmlControls; namespace MagicAjax.UI.Controls { /// <summary> /// HtmlAnchor control intented to be used for 'Session'/'Cache' page storing modes /// instead of ASP.NET's HtmlAnchor. /// </summary> /// <remarks> /// The HtmlAnchor control of ASP.NET, looses its 'Href' property when an AjaxCall /// is invoked at 'Session'/'Cache' page storing modes. This control don't have the /// same problem and can be used to replace ASP.NET's HtmlAnchor. /// </remarks> public class AjaxHtmlAnchor : HtmlAnchor { protected override void Render(System.Web.UI.HtmlTextWriter writer) { string href = this.HRef; base.Render (writer); this.HRef = href; } } } --- NEW FILE: AjaxHtmlImage.cs --- using System; using System.Web.UI.HtmlControls; namespace MagicAjax.UI.Controls { /// <summary> /// HtmlImage control intented to be used for 'Session'/'Cache' page storing modes /// instead of ASP.NET's HtmlImage. /// </summary> /// <remarks> /// The HtmlImage control of ASP.NET, looses its 'Src' property when an AjaxCall /// is invoked at 'Session'/'Cache' page storing modes. This control don't have the /// same problem and can be used to replace ASP.NET's HtmlImage. /// </remarks> public class AjaxHtmlImage : HtmlImage { protected override void Render(System.Web.UI.HtmlTextWriter writer) { string src = this.Src; base.Render (writer); this.Src = src; } } } |
From: Argiris K. <be...@us...> - 2005-11-20 13:46:36
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Controls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29341/Core/UI/Controls Modified Files: AjaxPanel.cs Log Message: Fixed some id mismatch bugs. Index: AjaxPanel.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxPanel.cs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** AjaxPanel.cs 20 Nov 2005 08:47:30 -0000 1.17 --- AjaxPanel.cs 20 Nov 2005 13:46:28 -0000 1.18 *************** *** 269,272 **** --- 269,280 ---- 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); *************** *** 383,387 **** { // The control is removed. Add a control with the same id ! // so that DoScriptRendering "removes" it from page if ( clientID.StartsWith (this.ClientID) ) { --- 391,395 ---- { // The control is removed. Add a control with the same id ! // so that RenderByScript "removes" it from page if ( clientID.StartsWith (this.ClientID) ) { *************** *** 460,464 **** _controlHtmls.Remove(con); ! AjaxCallHelper.WriteRemoveElementScript (ClientID, GetAjaxElemID(con)); } --- 468,472 ---- _controlHtmls.Remove(con); ! AjaxCallHelper.WriteRemoveElementScript (ClientID, GetAjaxElemID(ClientID + "_" + con.ClientID)); } *************** *** 770,773 **** --- 778,806 ---- #endregion + #region FindUniqueID + /// <summary> + /// Finds an ID that no other AjaxPanel's child control has. + /// </summary> + /// <returns></returns> + private string FindUniqueID() + { + string prefix = "_ajaxctl"; + string id; + for (int num=0; ; num++) + { + id = prefix + num; + int i; + for (i=0; i < this.Controls.Count; i++) + if (this.Controls[i].ID == id) + break; + + if (i == this.Controls.Count) + break; + } + + return id; + } + #endregion + #region GetAjaxElemID /// <summary> *************** *** 776,783 **** /// <param name="control"></param> /// <returns></returns> ! private static string GetAjaxElemID(Control control) { return control.ClientID + "$ajaxdest"; } #endregion --- 809,820 ---- /// <param name="control"></param> /// <returns></returns> ! private string GetAjaxElemID(Control control) { return control.ClientID + "$ajaxdest"; } + private string GetAjaxElemID(string clientID) + { + return clientID + "$ajaxdest"; + } #endregion |
From: Argiris K. <be...@us...> - 2005-11-20 08:47:45
|
Update of /cvsroot/magicajax/magicajax/Core/Interfaces In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3039/Core/Interfaces Modified Files: IAjaxCallEventHandler.cs IFormDataLoadedEventHandler.cs IPreWriteScriptEventHandler.cs IScriptWriter.cs Log Message: Fixed the visibility issues and other bugs. Added AjaxCallEnd event for 'Session/Cache' page storing modes. Fixed some comments. Index: IAjaxCallEventHandler.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/Interfaces/IAjaxCallEventHandler.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IAjaxCallEventHandler.cs 18 Nov 2005 18:53:07 -0000 1.2 --- IAjaxCallEventHandler.cs 20 Nov 2005 08:47:29 -0000 1.3 *************** *** 26,35 **** /// <summary> /// Interface for controls that do no inherit from AjaxControl and want to receive ! /// AjaxCall events. /// </summary> /// <remarks> ! /// The Load event of the page and its child controls is not raised during an AjaxCall. ! /// If you want to handle the AjaxCall event instead, implement the IAjaxCallEventHandler ! /// on the page or on a cuatom control. /// </remarks> /// <example> --- 26,35 ---- /// <summary> /// Interface for controls that do no inherit from AjaxControl and want to receive ! /// AjaxCall events. ('Session/Cache' page storing modes) /// </summary> /// <remarks> ! /// The Load event of the page and its child controls is not raised during an AjaxCall ! /// for 'Session/Cache' page storing modes. If you want to handle the AjaxCall event ! /// instead, implement the IAjaxCallEventHandler on the page or on a custom control. /// </remarks> /// <example> *************** *** 40,43 **** --- 40,47 ---- /// OnAjaxCall(EventArgs.Empty); /// } + /// public void RaiseAjaxCallEndEvent() + /// { + /// OnAjaxCallEnd(EventArgs.Empty); + /// } /// } /// </example> *************** *** 45,48 **** --- 49,53 ---- { void RaiseAjaxCallEvent(); + void RaiseAjaxCallEndEvent(); } } Index: IFormDataLoadedEventHandler.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/Interfaces/IFormDataLoadedEventHandler.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IFormDataLoadedEventHandler.cs 18 Nov 2005 18:53:07 -0000 1.3 --- IFormDataLoadedEventHandler.cs 20 Nov 2005 08:47:29 -0000 1.4 *************** *** 26,30 **** /// <summary> /// Interface for controls that want to receive the PostDataLoaded event that is ! /// raised by MagicAjaxModule. /// </summary> /// <remarks> --- 26,30 ---- /// <summary> /// Interface for controls that want to receive the PostDataLoaded event that is ! /// raised by MagicAjaxModule. ('Session/Cache' page storing modes) /// </summary> /// <remarks> Index: IPreWriteScriptEventHandler.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/Interfaces/IPreWriteScriptEventHandler.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IPreWriteScriptEventHandler.cs 18 Nov 2005 18:53:07 -0000 1.2 --- IPreWriteScriptEventHandler.cs 20 Nov 2005 08:47:29 -0000 1.3 *************** *** 26,30 **** /// <summary> /// Interface for controls and pages that do no inherit from RenderedByScriptControl ! /// and want to receive PreWriteScript events. /// </summary> public interface IPreWriteScriptEventHandler --- 26,30 ---- /// <summary> /// Interface for controls and pages that do no inherit from RenderedByScriptControl ! /// and want to receive PreWriteScript events. ('Session/Cache' page storing modes) /// </summary> public interface IPreWriteScriptEventHandler Index: IScriptWriter.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/Interfaces/IScriptWriter.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IScriptWriter.cs 18 Nov 2005 18:53:07 -0000 1.3 --- IScriptWriter.cs 20 Nov 2005 08:47:29 -0000 1.4 *************** *** 29,35 **** /// </summary> /// <remarks> ! /// WriteScript is called by MagicAjaxModule. A control that implements this method ! /// must use AjaxCallHelper.Write and the rest Write methods to send javascript ! /// code to the client. public interface IScriptWriter { --- 29,34 ---- /// </summary> /// <remarks> ! /// A control that implements this method should use AjaxCallHelper.Write and the rest ! /// Write methods to send javascript code to the client. public interface IScriptWriter { |
From: Argiris K. <be...@us...> - 2005-11-20 08:47:44
|
Update of /cvsroot/magicajax/magicajax/Core/UI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3039/Core/UI Modified Files: AjaxControl.cs AjaxPage.cs AjaxUserControl.cs RenderedByScriptControl.cs Log Message: Fixed the visibility issues and other bugs. Added AjaxCallEnd event for 'Session/Cache' page storing modes. Fixed some comments. Index: AjaxUserControl.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/AjaxUserControl.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** AjaxUserControl.cs 18 Nov 2005 18:53:07 -0000 1.5 --- AjaxUserControl.cs 20 Nov 2005 08:47:29 -0000 1.6 *************** *** 27,35 **** { /// <summary> ! /// Includes the AjaxCall event. /// </summary> /// <remarks> /// Inheriting from AjaxUserControls is not required, you can implement the ! /// IAjaxCallEventHandler on your usercontrol to handle the AjaxCall event. /// </remarks> public class AjaxUserControl : System.Web.UI.UserControl, IAjaxCallEventHandler --- 27,35 ---- { /// <summary> ! /// Includes the AjaxCall events and some helper properties. /// </summary> /// <remarks> /// Inheriting from AjaxUserControls is not required, you can implement the ! /// IAjaxCallEventHandler on your usercontrol to handle the AjaxCall events. /// </remarks> public class AjaxUserControl : System.Web.UI.UserControl, IAjaxCallEventHandler *************** *** 41,44 **** --- 41,49 ---- /// <summary> + /// Raised by MagicAjaxModule when an AjaxCallEnd occurs + /// </summary> + public event EventHandler AjaxCallEnd; + + /// <summary> /// Raises the AjaxCall event. /// </summary> *************** *** 52,55 **** --- 57,71 ---- /// <summary> + /// Raises the AjaxCallEnd event. + /// </summary> + /// <remarks> + /// Called by MagicAjaxModule. + /// </remarks> + public void RaiseAjaxCallEndEvent() + { + OnAjaxCallEnd (EventArgs.Empty); + } + + /// <summary> /// Determines if the control is being processed during an AjaxCall. /// </summary> *************** *** 65,68 **** --- 81,90 ---- AjaxCall(this, e); } + + protected virtual void OnAjaxCallEnd(EventArgs e) + { + if (AjaxCallEnd != null) + AjaxCallEnd(this, e); + } } } \ No newline at end of file Index: AjaxPage.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/AjaxPage.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** AjaxPage.cs 18 Nov 2005 18:53:07 -0000 1.5 --- AjaxPage.cs 20 Nov 2005 08:47:29 -0000 1.6 *************** *** 27,35 **** { /// <summary> ! /// Includes the AjaxCall event. /// </summary> /// <remarks> /// Inhering from AjaxPage is not required to apply AJAX on your pages. You can ! /// implement the IAjaxCallEventHandler on your page to handle the AjaxCall event. /// </remarks> public class AjaxPage : System.Web.UI.Page, IAjaxCallEventHandler --- 27,35 ---- { /// <summary> ! /// Includes the AjaxCall events and some helper properties. /// </summary> /// <remarks> /// Inhering from AjaxPage is not required to apply AJAX on your pages. You can ! /// implement the IAjaxCallEventHandler on your page to handle the AjaxCall events. /// </remarks> public class AjaxPage : System.Web.UI.Page, IAjaxCallEventHandler *************** *** 41,44 **** --- 41,49 ---- /// <summary> + /// Raised by MagicAjaxModule when an AjaxCallEnd occurs + /// </summary> + public event EventHandler AjaxCallEnd; + + /// <summary> /// Raises the AjaxCall event. /// </summary> *************** *** 52,55 **** --- 57,71 ---- /// <summary> + /// Raises the AjaxCallEnd event. + /// </summary> + /// <remarks> + /// Called by MagicAjaxModule. + /// </remarks> + public void RaiseAjaxCallEndEvent() + { + OnAjaxCallEnd (EventArgs.Empty); + } + + /// <summary> /// Determines if the page is being processed during an AjaxCall. /// </summary> *************** *** 65,68 **** --- 81,90 ---- AjaxCall(this, e); } + + protected virtual void OnAjaxCallEnd(EventArgs e) + { + if (AjaxCallEnd != null) + AjaxCallEnd(this, e); + } } } \ No newline at end of file Index: AjaxControl.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/AjaxControl.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** AjaxControl.cs 18 Nov 2005 18:53:07 -0000 1.5 --- AjaxControl.cs 20 Nov 2005 08:47:29 -0000 1.6 *************** *** 39,42 **** --- 39,47 ---- /// <summary> + /// Raised by the MagicAjaxModule. + /// </summary> + public event EventHandler AjaxCallEnd; + + /// <summary> /// Implements the IAjaxCallEventHandler interface. It is called by the MagicAjaxModule. /// </summary> *************** *** 46,49 **** --- 51,62 ---- } + /// <summary> + /// Implements the IAjaxCallEventHandler interface. It is called by the MagicAjaxModule. + /// </summary> + public void RaiseAjaxCallEndEvent() + { + OnAjaxCallEnd(EventArgs.Empty); + } + [Browsable(false),DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public bool IsPageNoStoreMode *************** *** 58,62 **** public bool IsAjaxCall { ! get { return AjaxCallHelper.IsAjaxCallForPage(this.Page); } } --- 71,75 ---- public bool IsAjaxCall { ! get { return ( HttpContext.Current != null && this.Page != null && AjaxCallHelper.IsAjaxCallForPage(this.Page) ); } } *************** *** 86,89 **** --- 99,108 ---- AjaxCall(this, e); } + + protected virtual void OnAjaxCallEnd(EventArgs e) + { + if (AjaxCallEnd != null) + AjaxCallEnd(this, e); + } } } Index: RenderedByScriptControl.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/RenderedByScriptControl.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** RenderedByScriptControl.cs 19 Nov 2005 01:31:23 -0000 1.8 --- RenderedByScriptControl.cs 20 Nov 2005 08:47:29 -0000 1.9 *************** *** 21,24 **** --- 21,25 ---- using System; + using System.Web; using System.Web.UI; using System.Web.UI.WebControls; *************** *** 76,79 **** --- 77,81 ---- private string _currentTagHtml = null; private bool _isHtmlRendered = false; + private bool _skipRendering = false; public event RenderStartEventHandler RenderStart; *************** *** 90,94 **** { if ( IsAjaxCall ! && (IsRenderedOnPage || IsPageNoStoreMode) && MonitorVisibilityState && value != base.Visible ) --- 92,96 ---- { if ( IsAjaxCall ! && IsRenderedOnPage && MonitorVisibilityState && value != base.Visible ) *************** *** 109,113 **** /// </remarks> [Browsable(false),DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] ! public bool IsRenderedOnPage { get { return _isRenderedOnPage; } --- 111,115 ---- /// </remarks> [Browsable(false),DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] ! public virtual bool IsRenderedOnPage { get { return _isRenderedOnPage; } *************** *** 151,154 **** --- 153,170 ---- /// <summary> + /// Defines wether the Render method will skip rendering completely. + /// </summary> + /// <remarks> + /// Mainly used by AjaxPanel for RenderedByScriptControls that have Visible + /// property set to false. + /// </remarks> + [Browsable(false),DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] + internal bool SkipRendering + { + get { return _skipRendering; } + set { _skipRendering = value; } + } + + /// <summary> /// It defines whether the RenderedByScriptControl was already rendered during /// a normal rendering. *************** *** 160,163 **** --- 176,180 ---- /// In this case it's not necessary to send any javascript to the client. /// </remarks> + [Browsable(false),DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] protected bool IsHtmlRendered { *************** *** 171,176 **** } ! protected override void OnPreRender(EventArgs e) { if (!IsChildOfRenderedByScriptControl(this)) { --- 188,195 ---- } ! protected override void OnLoad(EventArgs e) { + base.OnLoad (e); + if (!IsChildOfRenderedByScriptControl(this)) { *************** *** 195,202 **** Page.RegisterHiddenField(hiddenStore, null); ! Page.RegisterArrayDeclaration("RBS_Controls", String.Format("document.all[\"{0}$RBS_Holder\"]", this.ClientID)); Page.RegisterArrayDeclaration("RBS_Controls_Store", String.Format("document.all[\"{0}\"]", hiddenStore)); } - base.OnPreRender (e); } --- 214,220 ---- Page.RegisterHiddenField(hiddenStore, null); ! Page.RegisterArrayDeclaration("RBS_ControlIDs", String.Format("\"{0}$RBS_Holder\"", this.ClientID)); Page.RegisterArrayDeclaration("RBS_Controls_Store", String.Format("document.all[\"{0}\"]", hiddenStore)); } } *************** *** 222,242 **** protected override void Render(HtmlTextWriter writer) { - if ( IsPageNoStoreMode ) - _isRenderedOnPage = true; - RenderStartEventArgs eventArgs = new RenderStartEventArgs(writer); OnRenderStart(eventArgs); ! if (!eventArgs.AbortRendering) { ! // Put the html of this control inside a SPAN tag so that it can ! // be saved and restored when the page is loaded from the Browser's cache, ! // i.e. when the back button is pressed. ! writer.Write("<span id='{0}$RBS_Holder'>", this.ClientID); ! base.Render (writer); ! writer.Write("</span>"); ! _isHtmlRendered = true; ! _isRenderedOnPage = true; } --- 240,264 ---- protected override void Render(HtmlTextWriter writer) { RenderStartEventArgs eventArgs = new RenderStartEventArgs(writer); OnRenderStart(eventArgs); ! if ( !eventArgs.AbortRendering && !SkipRendering ) { ! if ( !IsAjaxCall || (writer.InnerWriter is IScriptRenderingDisabler && (writer.InnerWriter as IScriptRenderingDisabler).DisableScriptRendering) ) ! { ! // Put the html of this control inside a SPAN tag so that it can ! // be saved and restored when the page is loaded from the Browser's cache, ! // i.e. when the back button is pressed. ! writer.Write("<span id='{0}$RBS_Holder'>", this.ClientID); ! base.Render (writer); ! writer.Write("</span>"); ! _isHtmlRendered = true; ! _isRenderedOnPage = true; ! } ! else ! { ! WriteScript(); ! } } *************** *** 269,278 **** /// If the tag html of the control is changed, send the attributes using javascript. /// </summary> - /// <returns>True if rendering by script was needed, False if it was not</returns> public virtual void WriteScript() { if ( ! this.Visible ) { ! _isRenderedOnPage = HasVisibleNotRenderedByScriptParent(this); return; } --- 291,303 ---- /// If the tag html of the control is changed, send the attributes using javascript. /// </summary> public virtual void WriteScript() { if ( ! this.Visible ) { ! if (_isRenderedOnPage) ! { ! // Verify that it is indeed rendered on page ! _isRenderedOnPage = ( GetTopInvisibleControl(this) is RenderedByScriptControl ); ! } return; } *************** *** 282,304 **** return; - if ( ! IsRenderedOnPage ) - { - Control con = FindNextVisibleSibling(); - AjaxCallHelper.WriteAddElementScript (Parent.ClientID, this.GetTagName(), this.ClientID, "", (con == null) ? null : con.ClientID); - } - System.Text.StringBuilder sb = new System.Text.StringBuilder(); HtmlTextWriter strwriter = new HtmlTextWriter(new System.IO.StringWriter(sb)); ! // Take care of the tag of the control ! base.RenderBeginTag (strwriter); ! string html = sb.ToString(); ! sb.Length = 0; ! if(_currentTagHtml != html) { ! AjaxCallHelper.WriteSetAttributesOfControl (ClientID, FormatAttributes(html)); ! _currentTagHtml = html; } --- 307,342 ---- return; System.Text.StringBuilder sb = new System.Text.StringBuilder(); HtmlTextWriter strwriter = new HtmlTextWriter(new System.IO.StringWriter(sb)); ! if ( ! IsRenderedOnPage ) ! { ! // Put the control's tag on page, inside a RBS_Holder span. ! base.RenderBeginTag (strwriter); ! _currentTagHtml = sb.ToString(); ! base.RenderEndTag (strwriter); ! string html = sb.ToString(); ! Control con = FindNextVisibleSibling(); ! AjaxCallHelper.WriteAddElementScript (Parent.ClientID, "Span", this.ClientID + "$RBS_Holder", html, (con == null) ? null : con.ClientID); ! } ! else { ! // Take care of the tag of the control ! // TODO: Take care of the tag for 'NoStore' mode too. ! ! if ( ! IsPageNoStoreMode ) ! { ! base.RenderBeginTag (strwriter); ! string html = sb.ToString(); ! sb.Length = 0; ! ! if(_currentTagHtml != html) ! { ! AjaxCallHelper.WriteSetAttributesOfControl (ClientID, FormatAttributes(html)); ! _currentTagHtml = html; ! } ! } } *************** *** 308,311 **** --- 346,365 ---- } + /// <summary> + /// Gets the top control that has its Visible property set to false. + /// </summary> + /// <remarks> + /// It's used to determine whether the control is rendered on page or not. + /// </remarks> + /// <param name="control"></param> + /// <returns></returns> + protected Control GetTopInvisibleControl (Control control) + { + if ( control.Parent == null || control.Parent.Visible ) + return control; + else + return GetTopInvisibleControl(control.Parent); + } + protected virtual void OnRenderStart(RenderStartEventArgs eventArgs) { *************** *** 327,350 **** /// <summary> - /// Determines if the given control has a visible parent control that is not - /// of type RenderedByScriptControl. - /// </summary> - /// <remarks> - /// It's used to determine whether the control is rendered on page or not. - /// </remarks> - /// <param name="control"></param> - /// <returns></returns> - private bool HasVisibleNotRenderedByScriptParent(Control control) - { - if (control.Parent == null || control.Parent == control.Page) - return true; - - if (control.Parent is RenderedByScriptControl) - return HasVisibleNotRenderedByScriptParent(control.Parent); - else - return control.Parent.Visible; - } - - /// <summary> /// Finds the next visible control of the control collection of this /// control's parent that has its ID attribute set. --- 381,384 ---- *************** *** 411,414 **** --- 445,460 ---- return attribs.ToString(); } + + /// <summary> + /// Interface used with a HtmlTextWriter to define whether to disable + /// script rendering and do a normal rendering or not. + /// </summary> + protected interface IScriptRenderingDisabler + { + bool DisableScriptRendering + { + get; + } + } } } \ No newline at end of file |
From: Argiris K. <be...@us...> - 2005-11-20 08:47:44
|
Update of /cvsroot/magicajax/magicajax/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3039/Core Modified Files: AjaxCallHelper.cs MagicAjaxModule.cs Log Message: Fixed the visibility issues and other bugs. Added AjaxCallEnd event for 'Session/Cache' page storing modes. Fixed some comments. Index: AjaxCallHelper.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/AjaxCallHelper.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AjaxCallHelper.cs 18 Nov 2005 18:53:07 -0000 1.6 --- AjaxCallHelper.cs 20 Nov 2005 08:47:29 -0000 1.7 *************** *** 53,59 **** public sealed class AjaxCallHelper { private AjaxCallHelper() { } ! private static System.Text.StringBuilder sbScript = null; #region Static Properties --- 53,73 ---- public sealed class AjaxCallHelper { + #region Private Fields/Methods private AjaxCallHelper() { } ! private static ArrayList _sbWritingLevels; ! private static int _writingLevel; ! ! private static void MergeNextWritingLevelRecursive (int writingLevel) ! { ! int nextLevel = writingLevel + 1; ! if (_sbWritingLevels.Count == nextLevel) ! return; ! ! MergeNextWritingLevelRecursive (nextLevel); ! (_sbWritingLevels[writingLevel] as StringBuilder).Append((_sbWritingLevels[nextLevel] as StringBuilder).ToString()); ! _sbWritingLevels.RemoveAt (nextLevel); ! } ! #endregion #region Static Properties *************** *** 81,85 **** get { ! return ( MagicAjaxModule.Instance.IsAjaxCall ); } } --- 95,99 ---- get { ! return ( HttpContext.Current != null && MagicAjaxModule.Instance.IsAjaxCall ); } } *************** *** 90,94 **** public static bool IsPageNoStoreMode { ! get { return (MagicAjaxModule.Instance.Configuration.PageStore.Mode == Configuration.PageStoreMode.NoStore); } } --- 104,108 ---- public static bool IsPageNoStoreMode { ! get { return ( HttpContext.Current != null && MagicAjaxModule.Instance.Configuration.PageStore.Mode == Configuration.PageStoreMode.NoStore ); } } *************** *** 117,121 **** get { ! return ( MagicAjaxModule.Instance.Form["__EVENTTARGET"] == "__AJAX_AjaxCallTimer" ); } } --- 131,135 ---- get { ! return ( MagicAjaxModule.Instance.Form["__EVENTTARGET"] == "__AJAX_AJAXCALLTIMER" ); } } *************** *** 173,178 **** #region Static Methods /// <summary> ! /// Determines if the page is being processed during an AjaxCall. /// </summary> /// <remarks> --- 187,246 ---- #region Static Methods + /// <summary> + /// Increases the script writing level. + /// </summary> + /// <remarks> + /// There must be a matching DecreaseWritingLevel call. + /// See remarks of MergeUpperWritingLevelsWithCurrent method. + /// </remarks> + public static void IncreaseWritingLevel() + { + _writingLevel++; + if (_writingLevel == _sbWritingLevels.Count) + _sbWritingLevels.Add (new StringBuilder()); + } + /// <summary> ! /// Decreases the script writing level. ! /// </summary> ! /// <remarks> ! /// There must be a matching IncreaseWritingLevel call. ! /// See remarks of MergeUpperWritingLevelsWithCurrent method. ! /// </remarks> ! public static void DecreaseWritingLevel() ! { ! if (_writingLevel == 0) ! throw new MagicAjaxException("Script writing level cannot be negative."); ! ! _writingLevel--; ! } ! ! /// <summary> ! /// Merges the script rendering from upper leves into the current one. ! /// </summary> ! /// <remarks> ! /// Writing levels are used to control the ordering of script commands, ! /// especially for recursive methods. ! /// For example: ! /// AjaxCallHelper.IncreaseWritingLevel(); ! /// WriteMyScript(); ! /// AjaxCallHelper.DecreaseWritingLevel(); ! /// ! /// AjaxCallHelper.Write("MyScript rendering will be after this"); ! /// AjaxCallHelper.MergeUpperWritingLevelsWithCurrent() ! /// ! /// This will produce the output: ! /// MyScript rendering will be after this ! /// [MyScript method rendering] ! /// </remarks> ! public static void MergeUpperWritingLevelsWithCurrent() ! { ! MergeNextWritingLevelRecursive(_writingLevel); ! } ! ! /// <summary> ! /// Determines if the page is being processed for an AjaxCall. It's more accurate ! /// than IsAjaxCall because it returns false if the page is being processed ! /// for Server.Transfer. /// </summary> /// <remarks> *************** *** 443,447 **** // Use the string builder //Response.Write (text + "\r\n"); ! sbScript.Append (text + "\r\n"); } --- 511,515 ---- // Use the string builder //Response.Write (text + "\r\n"); ! (_sbWritingLevels[_writingLevel] as StringBuilder).Append (text + "\r\n"); } *************** *** 452,456 **** hr.StatusDescription = "OK"; ! sbScript = new System.Text.StringBuilder(); } --- 520,526 ---- hr.StatusDescription = "OK"; ! _sbWritingLevels = new ArrayList(); ! _sbWritingLevels.Add (new StringBuilder()); ! _writingLevel = 0; } *************** *** 464,467 **** --- 534,540 ---- public static void End() { + if (_writingLevel > 0) + throw new MagicAjaxException("Script writing level should be 0 at the end of AjaxCall. IncreaseWritingLevel calls do not match DecreaseWritingLevel calls."); + WriteEndSignature(); *************** *** 469,473 **** hr.Clear(); ! hr.Write (sbScript.ToString()); MagicAjaxModule.Instance.CompletedAjaxCall = true; --- 542,547 ---- hr.Clear(); ! MergeNextWritingLevelRecursive (0); ! hr.Write ((_sbWritingLevels[0] as StringBuilder).ToString()); MagicAjaxModule.Instance.CompletedAjaxCall = true; Index: MagicAjaxModule.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxModule.cs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** MagicAjaxModule.cs 18 Nov 2005 19:59:41 -0000 1.17 --- MagicAjaxModule.cs 20 Nov 2005 08:47:29 -0000 1.18 *************** *** 701,704 **** --- 701,706 ---- InvokeScriptWriters (page); + + RaiseAjaxCallEventEnd (page); } *************** *** 740,743 **** --- 742,763 ---- /// <summary> + /// Raises AjaxCallEnd event on the supplied control and its children. + /// </summary> + /// <remarks> + /// This is a recursive method. It goes through the control collection tree + /// and raises the AjaxCallEnd event on all the controls that implement the + /// IAjaxCallEventHandler interface. + /// </remarks> + /// <param name="control"></param> + protected virtual void RaiseAjaxCallEventEnd (Control control) + { + if (control is IAjaxCallEventHandler) + ((IAjaxCallEventHandler) control).RaiseAjaxCallEndEvent(); + + for (int i=0; i < control.Controls.Count; i++) + RaiseAjaxCallEventEnd (control.Controls[i]); + } + + /// <summary> /// Raises the PreWriteScript event on the supplied control and its children. /// </summary> |
From: Argiris K. <be...@us...> - 2005-11-20 08:47:44
|
Update of /cvsroot/magicajax/magicajax/Core/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3039/Core/script Modified Files: AjaxCallObject.js Log Message: Fixed the visibility issues and other bugs. Added AjaxCallEnd event for 'Session/Cache' page storing modes. Fixed some comments. Index: AjaxCallObject.js =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/script/AjaxCallObject.js,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** AjaxCallObject.js 19 Nov 2005 09:48:19 -0000 1.10 --- AjaxCallObject.js 20 Nov 2005 08:47:30 -0000 1.11 *************** *** 72,78 **** __bPageIsStored = bPageIsStored; ! if (typeof(RBS_Controls) != "undefined") { ! for (var i=0; i < RBS_Controls.length; i++) RBS_Controls_Store[i].setAttribute("ExcludeFromPost", "true"); } --- 72,78 ---- __bPageIsStored = bPageIsStored; ! if (typeof(RBS_ControlIDs) != "undefined") { ! for (var i=0; i < RBS_ControlIDs.length; i++) RBS_Controls_Store[i].setAttribute("ExcludeFromPost", "true"); } *************** *** 162,173 **** { // Restore the html of RenderedByScript controls ! if (typeof(RBS_Controls) != "undefined") { ! for (var i=0; i < RBS_Controls.length; i++) { var html = RBS_Controls_Store[i].value; ! if (html != "") { ! RBS_Controls[i].innerHTML = decodeURIComponent(html.substring(5, html.length)); RBS_Controls_Store[i].value = ""; } --- 162,174 ---- { // Restore the html of RenderedByScript controls ! if (typeof(RBS_ControlIDs) != "undefined") { ! for (var i=0; i < RBS_ControlIDs.length; i++) { + var elem = document.all[RBS_ControlIDs[i]]; var html = RBS_Controls_Store[i].value; ! if (html != "" && elem != null) { ! elem.innerHTML = decodeURIComponent(html.substring(5, html.length)); RBS_Controls_Store[i].value = ""; } *************** *** 182,189 **** // Save the html of RenderedByScript controls, so that it can be restored for the // browser's "Back Button" ! if (typeof(RBS_Controls) != "undefined") { ! for (var i=0; i < RBS_Controls.length; i++) ! RBS_Controls_Store[i].value = "HTML:" + encodeURIComponent(RBS_Controls[i].innerHTML); } if (__PreviousOnPageBeforeUnload != null) --- 183,194 ---- // Save the html of RenderedByScript controls, so that it can be restored for the // browser's "Back Button" ! if (typeof(RBS_ControlIDs) != "undefined") { ! for (var i=0; i < RBS_ControlIDs.length; i++) ! { ! var elem = document.all[RBS_ControlIDs[i]]; ! if (elem != null) ! RBS_Controls_Store[i].value = "HTML:" + encodeURIComponent(elem.innerHTML); ! } } if (__PreviousOnPageBeforeUnload != null) |
From: Argiris K. <be...@us...> - 2005-11-20 08:47:44
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Controls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3039/Core/UI/Controls Modified Files: AjaxPanel.cs Log Message: Fixed the visibility issues and other bugs. Added AjaxCallEnd event for 'Session/Cache' page storing modes. Fixed some comments. Index: AjaxPanel.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxPanel.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** AjaxPanel.cs 19 Nov 2005 09:48:19 -0000 1.16 --- AjaxPanel.cs 20 Nov 2005 08:47:30 -0000 1.17 *************** *** 208,211 **** --- 208,230 ---- #endregion + #region override IsRenderedOnPage + /// <summary> + /// If it's in 'NoStore' page mode, returns true if the AjaxPanel's fingerprint + /// is not empty, false if it is empty. + /// </summary> + public override bool IsRenderedOnPage + { + get + { + if ( IsPageNoStoreMode ) + { + return (HttpContext.Current.Request.Form[ControlCollectionState.GetControlFingerprintsField(this.ClientID)] != String.Empty); + } + else + return base.IsRenderedOnPage; + } + } + #endregion + #endregion *************** *** 227,230 **** --- 246,264 ---- #endregion + #region override OnUnload + protected override void OnUnload(EventArgs e) + { + if ( IsAjaxCall && IsPageNoStoreMode && IsRenderedOnPage) + { + // Verify that it is indeed rendered on page. If it's not, set its + // fingerprint to empty string. + if ( ! ( GetTopInvisibleControl(this) is RenderedByScriptControl ) ) + AjaxCallHelper.WriteSetFieldScript (ControlCollectionState.GetControlFingerprintsField(this.ClientID), String.Empty); + } + + base.OnUnload (e); + } + #endregion + #region override AddedControl /// <summary> *************** *** 268,309 **** protected override void RenderChildren(HtmlTextWriter writer) { ! if ( IsAjaxCall && IsPageNoStoreMode ) ! { ! LoadControlState(); ! DoScriptRendering (writer); ! } ! else ! { ! System.Text.StringBuilder sbFull = new System.Text.StringBuilder(); ! System.Text.StringBuilder sb = new System.Text.StringBuilder(); ! HtmlTextWriter fullwriter = new HtmlTextWriter(new System.IO.StringWriter(sbFull)); ! 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()); ! if (IsPageNoStoreMode) ! _controlHtmlHashes[con] = Util.GetBase64MD5Sum(sb.ToString()); ! else ! _controlHtmls[con] = sb.ToString(); ! sbFull.Length = 0; ! sb.Length = 0; ! writer.WriteEndTag ("span"); ! } ! _addedControls.Clear(); ! _removedControls.Clear(); } if ( IsPageNoStoreMode ) SaveControlState(); --- 302,335 ---- protected override void RenderChildren(HtmlTextWriter writer) { ! System.Text.StringBuilder sbFull = new System.Text.StringBuilder(); ! System.Text.StringBuilder sb = new System.Text.StringBuilder(); ! HtmlTextWriter fullwriter = new HtmlTextWriter(new System.IO.StringWriter(sbFull)); ! 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()); ! if (IsPageNoStoreMode) ! _controlHtmlHashes[con] = Util.GetBase64MD5Sum(sb.ToString()); ! else ! _controlHtmls[con] = sb.ToString(); ! sbFull.Length = 0; ! sb.Length = 0; ! writer.WriteEndTag ("span"); } + _addedControls.Clear(); + _removedControls.Clear(); + if ( IsPageNoStoreMode ) SaveControlState(); *************** *** 368,387 **** } ! #region override RenderByScript ! protected override void RenderByScript() ! { ! DoScriptRendering (new HtmlTextWriter(System.IO.TextWriter.Null)); ! } ! #endregion ! ! #region DoScriptRendering /// <summary> /// It scans child controls for added, removed or altered controls and sends /// the appropriate javascript to the client. /// </summary> ! protected virtual void DoScriptRendering (HtmlTextWriter output) { ! if ( IsAjaxCall && !IsPageNoStoreMode ) InitValidators(); System.Text.StringBuilder sb = new System.Text.StringBuilder(); --- 394,412 ---- } ! #region RenderByScript /// <summary> /// It scans child controls for added, removed or altered controls and sends /// the appropriate javascript to the client. /// </summary> ! protected override void RenderByScript() { ! if ( IsPageNoStoreMode ) ! { ! LoadControlState(); ! } ! else ! { InitValidators(); + } System.Text.StringBuilder sb = new System.Text.StringBuilder(); *************** *** 391,394 **** --- 416,422 ---- HtmlTextWriter fullwriter = new HtmlTextWriter(new System.IO.StringWriter(sbFull)); + // To be used in 'NoStore' mode to continue the rendering of control tree. + HtmlTextWriter nullWriter = new HtmlTextWriter(System.IO.TextWriter.Null); + bool allControlsAreNew = (Controls.Count == _addedControls.Count); *************** *** 405,409 **** fullwriter.Write (HtmlTextWriter.TagRightChar); ! ExtendedRenderControl (con, fullwriter, litewriter); fullwriter.WriteEndTag ("span"); --- 433,437 ---- fullwriter.Write (HtmlTextWriter.TagRightChar); ! ExtendedRenderControl (con, fullwriter, litewriter, true); fullwriter.WriteEndTag ("span"); *************** *** 421,425 **** string html = sbFull.ToString(); AjaxCallHelper.WriteSetHtmlOfElementScript (html, ClientID); - output.Write (html); } } --- 449,452 ---- *************** *** 446,454 **** { // It's a new control, create it on the client at the appropriate place. ! ExtendedRenderControl (con, fullwriter, litewriter); html = sbFull.ToString(); AjaxCallHelper.WriteAddElementScript (ClientID, "span", GetAjaxElemID(con), html, GetNextExistingElement(i)); - output.Write (html); if (IsPageNoStoreMode) --- 473,480 ---- { // It's a new control, create it on the client at the appropriate place. ! ExtendedRenderControl (con, fullwriter, litewriter, true); html = sbFull.ToString(); AjaxCallHelper.WriteAddElementScript (ClientID, "span", GetAjaxElemID(con), html, GetNextExistingElement(i)); if (IsPageNoStoreMode) *************** *** 460,464 **** { if ( IsPageNoStoreMode ) ! ExtendedRenderControl (con, output, litewriter); else ExtendedRenderControl (con, litewriter); --- 486,496 ---- { if ( IsPageNoStoreMode ) ! { ! // Any scripts of child controls should be after the scripts ! // of parent controls, so increase the script writing level. ! AjaxCallHelper.IncreaseWritingLevel(); ! ExtendedRenderControl (con, nullWriter, litewriter); ! AjaxCallHelper.DecreaseWritingLevel(); ! } else ExtendedRenderControl (con, litewriter); *************** *** 486,489 **** --- 518,526 ---- } } + + if ( IsPageNoStoreMode ) + { + AjaxCallHelper.MergeUpperWritingLevelsWithCurrent(); + } } } *************** *** 492,495 **** --- 529,535 ---- _addedControls.Clear(); _removedControls.Clear(); + + if ( IsPageNoStoreMode ) + SaveControlState(); } #endregion *************** *** 540,544 **** for (int i=0; i < list.Count; i++) { ! RenderedByScriptControl con = (RenderedByScriptControl) list[i]; con.RenderStart += renderStart; visibleProps[i] = con.Visible; --- 580,584 ---- for (int i=0; i < list.Count; i++) { ! RenderedByScriptControl con = list[i] as RenderedByScriptControl; con.RenderStart += renderStart; visibleProps[i] = con.Visible; *************** *** 552,556 **** for (int i=0; i < list.Count; i++) { ! RenderedByScriptControl con = (RenderedByScriptControl) list[i]; con.RenderStart -= renderStart; con.Visible = visibleProps[i]; --- 592,596 ---- for (int i=0; i < list.Count; i++) { ! RenderedByScriptControl con = list[i] as RenderedByScriptControl; con.RenderStart -= renderStart; con.Visible = visibleProps[i]; *************** *** 578,581 **** --- 618,628 ---- #region ExtendedRenderControl + private void ExtendedRenderControl(Control control, HtmlTextWriter fullwriter, HtmlTextWriter litewriter) + { + ExtendedRenderControl (control, fullwriter, litewriter, false); + } + #endregion + + #region ExtendedRenderControl /// <summary> /// It produces the full rendering of the control and the rendering without *************** *** 588,603 **** /// <param name="fullwriter">The writer to use for the full rendering</param> /// <param name="litewriter">The writer to use for the rendering without any RenderedByScriptControl controls</param> ! private void ExtendedRenderControl(Control control, HtmlTextWriter fullwriter, HtmlTextWriter litewriter) { ! ExtendedTextWriter extTextWriter = new ExtendedTextWriter(fullwriter, litewriter); RenderStartEventHandler renderStart = new RenderStartEventHandler(extTextWriter.IScriptWriter_RenderStart); EventHandler renderEnd = new EventHandler(extTextWriter.IScriptWriter_RenderEnd); ArrayList list = FindRenderedByScriptControls(control); ! foreach (RenderedByScriptControl con in list) { con.RenderStart += renderStart; con.RenderEnd += renderEnd; } --- 635,659 ---- /// <param name="fullwriter">The writer to use for the full rendering</param> /// <param name="litewriter">The writer to use for the rendering without any RenderedByScriptControl controls</param> ! private void ExtendedRenderControl(Control control, HtmlTextWriter fullwriter, HtmlTextWriter litewriter, bool disableScriptRendering) { ! ExtendedTextWriter extTextWriter = new ExtendedTextWriter(fullwriter, litewriter, disableScriptRendering); RenderStartEventHandler renderStart = new RenderStartEventHandler(extTextWriter.IScriptWriter_RenderStart); EventHandler renderEnd = new EventHandler(extTextWriter.IScriptWriter_RenderEnd); ArrayList list = FindRenderedByScriptControls(control); + bool[] visibleProps = new bool[list.Count]; + bool[] monitorProps = new bool[list.Count]; ! for (int i=0; i < list.Count; i++) { + RenderedByScriptControl con = list[i] as RenderedByScriptControl; con.RenderStart += renderStart; con.RenderEnd += renderEnd; + if ( ! con.Visible ) + con.SkipRendering = true; + visibleProps[i] = con.Visible; + monitorProps[i] = con.MonitorVisibilityState; + con.MonitorVisibilityState = false; + con.Visible = true; } *************** *** 605,612 **** control.RenderControl (extwriter); ! foreach (RenderedByScriptControl con in list) { con.RenderStart -= renderStart; con.RenderEnd -= renderEnd; } --- 661,672 ---- control.RenderControl (extwriter); ! for (int i=0; i < list.Count; i++) { + RenderedByScriptControl con = list[i] as RenderedByScriptControl; con.RenderStart -= renderStart; con.RenderEnd -= renderEnd; + con.Visible = visibleProps[i]; + con.MonitorVisibilityState = monitorProps[i]; + con.SkipRendering = false; } *************** *** 854,861 **** /// It's used by ExtendedRenderControl(Control, HtmlTextWriter, HtmlTextWriter). /// </remarks> ! private class ExtendedTextWriter : System.IO.TextWriter { private HtmlTextWriter fullwriter, litewriter; private bool onlyFullRender = false; public override System.Text.Encoding Encoding --- 914,922 ---- /// It's used by ExtendedRenderControl(Control, HtmlTextWriter, HtmlTextWriter). /// </remarks> ! private class ExtendedTextWriter : System.IO.TextWriter, IScriptRenderingDisabler { private HtmlTextWriter fullwriter, litewriter; private bool onlyFullRender = false; + private bool _disableScriptRendering = false; public override System.Text.Encoding Encoding *************** *** 880,887 **** } ! public ExtendedTextWriter(HtmlTextWriter fullwriter, HtmlTextWriter litewriter) : base(null) { this.fullwriter = fullwriter; this.litewriter = litewriter; } --- 941,949 ---- } ! public ExtendedTextWriter(HtmlTextWriter fullwriter, HtmlTextWriter litewriter, bool disableScriptRendering) : base(null) { this.fullwriter = fullwriter; this.litewriter = litewriter; + _disableScriptRendering = disableScriptRendering; } *************** *** 990,993 **** --- 1052,1067 ---- } #endregion + + #region IScriptRenderingDisabler Members + + public bool DisableScriptRendering + { + get + { + return _disableScriptRendering; + } + } + + #endregion } #endregion |
From: Dion O. <dol...@us...> - 2005-11-19 09:48:27
|
Update of /cvsroot/magicajax/magicajax/Core/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16575/magicajax/Core/script Modified Files: AjaxCallObject.js Log Message: - Used 'AJAXCbo.SetFieldIfEmptyScript' to fill the fingerprint hidden fields from script. - Changed some document.all statements in AjaxCallObject.js (because document.all is IE only?) Index: AjaxCallObject.js =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/script/AjaxCallObject.js,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** AjaxCallObject.js 18 Nov 2005 18:53:07 -0000 1.9 --- AjaxCallObject.js 19 Nov 2005 09:48:19 -0000 1.10 *************** *** 193,197 **** AjaxCallObject.prototype.OnPageUnload = function() { ! if (document.all["__AJAX_PAGEKEY"] == null) return; --- 193,197 ---- AjaxCallObject.prototype.OnPageUnload = function() { ! if (document.forms[0]["__AJAX_PAGEKEY"] == null) return; *************** *** 201,205 **** thePage = thePage.substring(0, index); ! thePage = thePage + "?__AJAX_PAGEUNLOAD=" + encodeURIComponent(document.all["__AJAX_PAGEKEY"].value); var oThis = AJAXCbo; --- 201,205 ---- thePage = thePage.substring(0, index); ! thePage = thePage + "?__AJAX_PAGEUNLOAD=" + encodeURIComponent(document.forms[0]["__AJAX_PAGEKEY"].value); var oThis = AJAXCbo; *************** *** 455,459 **** AjaxCallObject.prototype.SetFieldScript = function(fieldName, fieldValue) { ! document.all.item(fieldName).value = fieldValue; } --- 455,468 ---- AjaxCallObject.prototype.SetFieldScript = function(fieldName, fieldValue) { ! var field = document.forms[0][fieldName]; ! if (field != null) ! field.value = fieldValue; ! } ! ! AjaxCallObject.prototype.SetFieldIfEmptyScript = function(fieldName, fieldValue) ! { ! var field = document.forms[0][fieldName]; ! if (field != null && field.value == '') ! field.value = fieldValue; } |
From: Dion O. <dol...@us...> - 2005-11-19 09:48:27
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Controls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16575/magicajax/Core/UI/Controls Modified Files: AjaxPanel.cs Log Message: - Used 'AJAXCbo.SetFieldIfEmptyScript' to fill the fingerprint hidden fields from script. - Changed some document.all statements in AjaxCallObject.js (because document.all is IE only?) Index: AjaxPanel.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxPanel.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** AjaxPanel.cs 19 Nov 2005 01:43:53 -0000 1.15 --- AjaxPanel.cs 19 Nov 2005 09:48:19 -0000 1.16 *************** *** 839,843 **** // The hidden field is already registered at OnLoad event. // Set its value by javascript. ! page.RegisterStartupScript(panelKey + "VALUESET", String.Format("<script language='javascript'>AJAXCbo.SetFieldScript(\"{0}\",{1});</script>", panelKey, AjaxCallHelper.EncodeString(serializedPanelStateHashes))); } --- 839,843 ---- // The hidden field is already registered at OnLoad event. // Set its value by javascript. ! page.RegisterStartupScript(panelKey + "VALUESET", String.Format("<script type='text/javascript'>AJAXCbo.SetFieldIfEmptyScript(\"{0}\",{1});</script>", panelKey, AjaxCallHelper.EncodeString(serializedPanelStateHashes))); } |
From: Argiris K. <be...@us...> - 2005-11-19 01:44:05
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Controls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28846/Core/UI/Controls Modified Files: AjaxPanel.cs Log Message: Comment fix Index: AjaxPanel.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxPanel.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** AjaxPanel.cs 19 Nov 2005 01:31:23 -0000 1.14 --- AjaxPanel.cs 19 Nov 2005 01:43:53 -0000 1.15 *************** *** 837,841 **** else { ! // The hidden field is already registered at OnPreRender. // Set its value by javascript. page.RegisterStartupScript(panelKey + "VALUESET", String.Format("<script language='javascript'>AJAXCbo.SetFieldScript(\"{0}\",{1});</script>", panelKey, AjaxCallHelper.EncodeString(serializedPanelStateHashes))); --- 837,841 ---- else { ! // The hidden field is already registered at OnLoad event. // Set its value by javascript. page.RegisterStartupScript(panelKey + "VALUESET", String.Format("<script language='javascript'>AJAXCbo.SetFieldScript(\"{0}\",{1});</script>", panelKey, AjaxCallHelper.EncodeString(serializedPanelStateHashes))); |
From: Argiris K. <be...@us...> - 2005-11-19 01:31:31
|
Update of /cvsroot/magicajax/magicajax/Core/UI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26903/Core/UI Modified Files: RenderedByScriptControl.cs Log Message: Fixed a visibility issue. CONTROL_FINGERPRINTS are registered at OnLoad event in case an AjaxPanel has Visible property set to false. Index: RenderedByScriptControl.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/RenderedByScriptControl.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RenderedByScriptControl.cs 18 Nov 2005 19:18:12 -0000 1.7 --- RenderedByScriptControl.cs 19 Nov 2005 01:31:23 -0000 1.8 *************** *** 274,278 **** if ( ! this.Visible ) { ! _isRenderedOnPage = false; return; } --- 274,278 ---- if ( ! this.Visible ) { ! _isRenderedOnPage = HasVisibleNotRenderedByScriptParent(this); return; } *************** *** 327,330 **** --- 327,350 ---- /// <summary> + /// Determines if the given control has a visible parent control that is not + /// of type RenderedByScriptControl. + /// </summary> + /// <remarks> + /// It's used to determine whether the control is rendered on page or not. + /// </remarks> + /// <param name="control"></param> + /// <returns></returns> + private bool HasVisibleNotRenderedByScriptParent(Control control) + { + if (control.Parent == null || control.Parent == control.Page) + return true; + + if (control.Parent is RenderedByScriptControl) + return HasVisibleNotRenderedByScriptParent(control.Parent); + else + return control.Parent.Visible; + } + + /// <summary> /// Finds the next visible control of the control collection of this /// control's parent that has its ID attribute set. |
From: Argiris K. <be...@us...> - 2005-11-19 01:31:31
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Controls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26903/Core/UI/Controls Modified Files: AjaxPanel.cs Log Message: Fixed a visibility issue. CONTROL_FINGERPRINTS are registered at OnLoad event in case an AjaxPanel has Visible property set to false. Index: AjaxPanel.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxPanel.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** AjaxPanel.cs 18 Nov 2005 18:53:07 -0000 1.13 --- AjaxPanel.cs 19 Nov 2005 01:31:23 -0000 1.14 *************** *** 222,225 **** --- 222,227 ---- this.AjaxCallConnection = this._ajaxCallConnection; } + + Page.RegisterHiddenField (ControlCollectionState.GetControlFingerprintsField(this.ClientID), String.Empty); } #endregion *************** *** 322,327 **** if (_controlState == null) { ! // State expired ! Page.Response.Redirect (Page.Request.RawUrl); } --- 324,328 ---- if (_controlState == null) { ! throw new MagicAjaxException(String.Format("The control fingerprints for AjaxPanel '{0}' is not rendered on page.", this.ClientID)); } *************** *** 760,769 **** { SortedList controlIDHtmlHashes = new SortedList(); ! string[] namevaluepairs = panelControlStates.Split(';'); ! for (int i = 0; i < namevaluepairs.Length; i++) { ! string namevaluepair = namevaluepairs[i]; ! string[] namevalue = namevaluepair.Split('#'); ! controlIDHtmlHashes.Add(string.Format("{0}_{1}", panelClientID, namevalue[0]), namevalue[1]); } --- 761,773 ---- { SortedList controlIDHtmlHashes = new SortedList(); ! if (panelControlStates != String.Empty) { ! string[] namevaluepairs = panelControlStates.Split(';'); ! for (int i = 0; i < namevaluepairs.Length; i++) ! { ! string namevaluepair = namevaluepairs[i]; ! string[] namevalue = namevaluepair.Split('#'); ! controlIDHtmlHashes.Add(string.Format("{0}_{1}", panelClientID, namevalue[0]), namevalue[1]); ! } } *************** *** 833,837 **** else { ! page.RegisterHiddenField(panelKey, serializedPanelStateHashes); } --- 837,843 ---- else { ! // The hidden field is already registered at OnPreRender. ! // Set its value by javascript. ! page.RegisterStartupScript(panelKey + "VALUESET", String.Format("<script language='javascript'>AJAXCbo.SetFieldScript(\"{0}\",{1});</script>", panelKey, AjaxCallHelper.EncodeString(serializedPanelStateHashes))); } |
From: Dion O. <dol...@us...> - 2005-11-18 19:59:50
|
Update of /cvsroot/magicajax/magicajax/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9442/magicajax/Core Modified Files: MagicAjaxModule.cs Log Message: oops, fix a minor bug (now caching the embedded AjaxCallObject.js file) Index: MagicAjaxModule.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxModule.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** MagicAjaxModule.cs 18 Nov 2005 19:55:25 -0000 1.16 --- MagicAjaxModule.cs 18 Nov 2005 19:59:41 -0000 1.17 *************** *** 442,445 **** --- 442,446 ---- cachedAjaxCallObjectJs = reader.ReadToEnd(); } + context.Cache.Insert("__CACHED_AJAXCALLOBJECT_JS", cachedAjaxCallObjectJs); } context.Response.Write(cachedAjaxCallObjectJs); |
From: Dion O. <dol...@us...> - 2005-11-18 19:55:37
|
Update of /cvsroot/magicajax/magicajax/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8265/magicajax/Core Modified Files: MagicAjaxModule.cs Log Message: Added Application_BeginRequest handler to return the embedded "AjaxCallObject.js" script on requests to "AjaxCallObject.js.aspx". So the javascript of AjaxCallObject.js isn't visible in the html source now. Index: MagicAjaxModule.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxModule.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** MagicAjaxModule.cs 18 Nov 2005 18:53:07 -0000 1.15 --- MagicAjaxModule.cs 18 Nov 2005 19:55:25 -0000 1.16 *************** *** 122,125 **** --- 122,126 ---- _config = new MagicAjaxConfiguration(null); application.AcquireRequestState += new EventHandler(Application_AcquireRequestState); + application.BeginRequest += new EventHandler(Application_BeginRequest); application.EndRequest += new EventHandler(Application_EndRequest); } *************** *** 163,174 **** { #if NET_2_0 ! //use the webresource url for AjaxCallObject.js includeScript = String.Format("<script type=\"text/javascript\" src=\"{0}\"></script>", page.ClientScript.GetWebResourceUrl(typeof(MagicAjaxModule), "MagicAjax.script.AjaxCallObject.js")); #else ! //read and output the embedded AjaxCallObject.js file from the manifest ! using (System.IO.StreamReader reader = new System.IO.StreamReader(typeof(MagicAjaxModule).Assembly.GetManifestResourceStream("MagicAjax.script.AjaxCallObject.js"))) ! { ! includeScript = String.Format("<script type=\"text/javascript\">\r\n<!--\r\n{0}\r\n//-->\r\n</script>", reader.ReadToEnd()); ! } #endif } --- 164,172 ---- { #if NET_2_0 ! // Use the webresource url for AjaxCallObject.js includeScript = String.Format("<script type=\"text/javascript\" src=\"{0}\"></script>", page.ClientScript.GetWebResourceUrl(typeof(MagicAjaxModule), "MagicAjax.script.AjaxCallObject.js")); #else ! // src-request to "AjaxCallObject.js.aspx" will be handled by Application_BeginRequest, which returns the embedded AjaxCallObject.js script ! includeScript = String.Format("<script type=\"text/javascript\" src=\"{0}\"></script>", "AjaxCallObject.js.aspx"); #endif } *************** *** 422,425 **** --- 420,452 ---- /// <summary> + /// Handles the BeginRequest event of the HttpApplication + /// Currently only used to return the embedded "AjaxCallObject.js" script + /// on requests to "AjaxCallObject.js.aspx" + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + void Application_BeginRequest(object sender, EventArgs e) + { + HttpContext context = ((HttpApplication)sender).Context; + + // Check if the request is for the embedded AjaxCallObject.js script + if (context.Request.RawUrl.EndsWith("AjaxCallObject.js.aspx")) + { + context.Response.ContentType = "text/javascript"; + object cachedAjaxCallObjectJs = context.Cache["__CACHED_AJAXCALLOBJECT_JS"]; + if (cachedAjaxCallObjectJs == null) + { + //read and output the embedded AjaxCallObject.js file from the manifest + using (System.IO.StreamReader reader = new System.IO.StreamReader(typeof(MagicAjaxModule).Assembly.GetManifestResourceStream("MagicAjax.script.AjaxCallObject.js"))) + { + cachedAjaxCallObjectJs = reader.ReadToEnd(); + } + } + context.Response.Write(cachedAjaxCallObjectJs); + context.Response.End(); + } + } + + /// <summary> /// Handles the AcquireRequestState event of the HttpApplication /// </summary> *************** *** 649,652 **** --- 676,683 ---- Util.CallPrivateMethod (page, typeof(Page), "SetIntrinsics", _context); + #if NET_2_0 + Util.CallPrivateMethod(page, typeof(Page), "ProcessRequest"); + #endif + ReadOnlyArrayList postDataChangedControls; postDataChangedControls = new ReadOnlyArrayList(LoadFormDataOnChildren(page)); |
From: Argiris K. <be...@us...> - 2005-11-18 19:18:25
|
Update of /cvsroot/magicajax/magicajax/Core/UI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29982/Core/UI Modified Files: RenderedByScriptControl.cs Log Message: Bug fix: Visible property of AjaxPanel was not working for 'NoStore'. Index: RenderedByScriptControl.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/RenderedByScriptControl.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** RenderedByScriptControl.cs 18 Nov 2005 18:53:07 -0000 1.6 --- RenderedByScriptControl.cs 18 Nov 2005 19:18:12 -0000 1.7 *************** *** 90,94 **** { if ( IsAjaxCall ! && IsRenderedOnPage && MonitorVisibilityState && value != base.Visible ) --- 90,94 ---- { if ( IsAjaxCall ! && (IsRenderedOnPage || IsPageNoStoreMode) && MonitorVisibilityState && value != base.Visible ) |
From: Argiris K. <be...@us...> - 2005-11-18 18:54:25
|
Update of /cvsroot/magicajax/magicajax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21112 Added Files: Authors.txt Log Message: The team behind MagicAjax. --- NEW FILE: Authors.txt --- AUTHORS ======= MagicAjax.NET Team -------------- Argiris Kirtzidis (Bekas) Dion Olsthoorn (Dion) ----- Copyright 2005 The MagicAjax.NET Team. This file is part of the MagicAjax.NET framework. MagicAjax.NET is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. MagicAjax.NET is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with MagicAjax.NET; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
From: Argiris K. <be...@us...> - 2005-11-18 18:53:17
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Controls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20616/Core/UI/Controls Modified Files: AjaxPanel.cs Log Message: Changed 'MagicAjax library' to 'framework' as this is more appropriate. Fixed a bug of ExtendedRendering for 'NoStore'. Index: AjaxPanel.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxPanel.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** AjaxPanel.cs 18 Nov 2005 17:46:17 -0000 1.12 --- AjaxPanel.cs 18 Nov 2005 18:53:07 -0000 1.13 *************** *** 1,5 **** #region LGPL License /* ! MagicAjax Library Copyright (C) 2005 MagicAjax Project Team --- 1,5 ---- #region LGPL License /* ! MagicAjax.NET Framework Copyright (C) 2005 MagicAjax Project Team *************** *** 313,322 **** //note:only for NoStore mode _controlState.SetControlIDs(_controlHtmlHashes); ! _controlState.Save (this.UniqueID, this.Page); } protected virtual void LoadControlState() { ! _controlState = ControlCollectionState.LoadState (this.UniqueID, this); if (_controlState == null) --- 313,322 ---- //note:only for NoStore mode _controlState.SetControlIDs(_controlHtmlHashes); ! _controlState.Save (this.ClientID, this.Page); } protected virtual void LoadControlState() { ! _controlState = ControlCollectionState.LoadState (this.ClientID, this); if (_controlState == null) *************** *** 472,476 **** if (htmlHashCode != (string)_controlHtmlHashes[con]) { ! AjaxCallHelper.WriteSetHtmlOfElementScript(html, GetAjaxElemID(con)); _controlHtmlHashes[con] = htmlHashCode; } --- 472,476 ---- if (htmlHashCode != (string)_controlHtmlHashes[con]) { ! ExtendedWriteSetHtmlOfElementScript(html, GetAjaxElemID(con)); _controlHtmlHashes[con] = htmlHashCode; } *************** *** 751,759 **** /// Loads the ControlCollectionState from the hidden form element /// </summary> ! /// <param name="panelUniqueID"></param> /// <returns></returns> ! public static ControlCollectionState LoadState(string panelUniqueID, Control owner) { ! string panelKey = GetControlFingerprintsField(panelUniqueID); string panelControlStates = HttpContext.Current.Request.Form[panelKey]; if (panelControlStates != null) --- 751,759 ---- /// Loads the ControlCollectionState from the hidden form element /// </summary> ! /// <param name="panelClientID"></param> /// <returns></returns> ! public static ControlCollectionState LoadState(string panelClientID, Control owner) { ! string panelKey = GetControlFingerprintsField(panelClientID); string panelControlStates = HttpContext.Current.Request.Form[panelKey]; if (panelControlStates != null) *************** *** 765,769 **** string namevaluepair = namevaluepairs[i]; string[] namevalue = namevaluepair.Split('#'); ! controlIDHtmlHashes.Add(string.Format("{0}_{1}", panelUniqueID, namevalue[0]), namevalue[1]); } --- 765,769 ---- string namevaluepair = namevaluepairs[i]; string[] namevalue = namevaluepair.Split('#'); ! controlIDHtmlHashes.Add(string.Format("{0}_{1}", panelClientID, namevalue[0]), namevalue[1]); } *************** *** 779,787 **** /// Returns the ClientID of the hidden field containing the Control fingerprints for given panel /// </summary> ! /// <param name="panelUniqueID"></param> /// <returns></returns> ! public static string GetControlFingerprintsField(string panelUniqueID) { ! return string.Format("__CONTROL_FINGERPRINTS_{0}", panelUniqueID); } --- 779,787 ---- /// Returns the ClientID of the hidden field containing the Control fingerprints for given panel /// </summary> ! /// <param name="panelClientID"></param> /// <returns></returns> ! public static string GetControlFingerprintsField(string panelClientID) { ! return string.Format("__CONTROL_FINGERPRINTS_{0}", panelClientID); } *************** *** 802,808 **** /// When in AjaxCall mode, creates SetFieldScript to set hidden field when last ControlState hashes were changed. /// </summary> ! /// <param name="panelUniqueID"></param> /// <param name="page"></param> ! public void Save(string panelUniqueID, Page page) { System.Text.StringBuilder sbuilder = new System.Text.StringBuilder(); --- 802,808 ---- /// When in AjaxCall mode, creates SetFieldScript to set hidden field when last ControlState hashes were changed. /// </summary> ! /// <param name="panelClientID"></param> /// <param name="page"></param> ! public void Save(string panelClientID, Page page) { System.Text.StringBuilder sbuilder = new System.Text.StringBuilder(); *************** *** 815,819 **** } ! string keyWithoutNamingcontainer = key.Substring(panelUniqueID.Length + 1); sbuilder.AppendFormat("{0}#{1}", keyWithoutNamingcontainer, _controlIDHtmlHashes[key]); --- 815,819 ---- } ! string keyWithoutNamingcontainer = key.Substring(panelClientID.Length + 1); sbuilder.AppendFormat("{0}#{1}", keyWithoutNamingcontainer, _controlIDHtmlHashes[key]); *************** *** 821,825 **** string serializedPanelStateHashes = sbuilder.ToString(); ! string panelKey = GetControlFingerprintsField(panelUniqueID); if ( AjaxCallHelper.IsAjaxCallForPage(_owner.Page) ) --- 821,825 ---- string serializedPanelStateHashes = sbuilder.ToString(); ! string panelKey = GetControlFingerprintsField(panelClientID); if ( AjaxCallHelper.IsAjaxCallForPage(_owner.Page) ) |
From: Argiris K. <be...@us...> - 2005-11-18 18:53:17
|
Update of /cvsroot/magicajax/magicajax/Core/UI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20616/Core/UI Modified Files: AjaxControl.cs AjaxPage.cs AjaxUserControl.cs RenderedByScriptControl.cs Log Message: Changed 'MagicAjax library' to 'framework' as this is more appropriate. Fixed a bug of ExtendedRendering for 'NoStore'. Index: AjaxUserControl.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/AjaxUserControl.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AjaxUserControl.cs 17 Nov 2005 15:03:16 -0000 1.4 --- AjaxUserControl.cs 18 Nov 2005 18:53:07 -0000 1.5 *************** *** 1,5 **** #region LGPL License /* ! MagicAjax Library Copyright (C) 2005 MagicAjax Project Team --- 1,5 ---- #region LGPL License /* ! MagicAjax.NET Framework Copyright (C) 2005 MagicAjax Project Team Index: AjaxPage.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/AjaxPage.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AjaxPage.cs 17 Nov 2005 15:03:16 -0000 1.4 --- AjaxPage.cs 18 Nov 2005 18:53:07 -0000 1.5 *************** *** 1,5 **** #region LGPL License /* ! MagicAjax Library Copyright (C) 2005 MagicAjax Project Team --- 1,5 ---- #region LGPL License /* ! MagicAjax.NET Framework Copyright (C) 2005 MagicAjax Project Team Index: AjaxControl.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/AjaxControl.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AjaxControl.cs 17 Nov 2005 15:03:16 -0000 1.4 --- AjaxControl.cs 18 Nov 2005 18:53:07 -0000 1.5 *************** *** 1,5 **** #region LGPL License /* ! MagicAjax Library Copyright (C) 2005 MagicAjax Project Team --- 1,5 ---- #region LGPL License /* ! MagicAjax.NET Framework Copyright (C) 2005 MagicAjax Project Team Index: RenderedByScriptControl.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/RenderedByScriptControl.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RenderedByScriptControl.cs 18 Nov 2005 10:29:04 -0000 1.5 --- RenderedByScriptControl.cs 18 Nov 2005 18:53:07 -0000 1.6 *************** *** 1,5 **** #region LGPL License /* ! MagicAjax Library Copyright (C) 2005 MagicAjax Project Team --- 1,5 ---- #region LGPL License /* ! MagicAjax.NET Framework Copyright (C) 2005 MagicAjax Project Team |
From: Argiris K. <be...@us...> - 2005-11-18 18:53:17
|
Update of /cvsroot/magicajax/magicajax/Core/Interfaces In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20616/Core/Interfaces Modified Files: IAjaxCallEventHandler.cs IFormDataLoadedEventHandler.cs IPreWriteScriptEventHandler.cs IScriptWriter.cs Log Message: Changed 'MagicAjax library' to 'framework' as this is more appropriate. Fixed a bug of ExtendedRendering for 'NoStore'. Index: IAjaxCallEventHandler.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/Interfaces/IAjaxCallEventHandler.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IAjaxCallEventHandler.cs 14 Nov 2005 18:50:43 -0000 1.1 --- IAjaxCallEventHandler.cs 18 Nov 2005 18:53:07 -0000 1.2 *************** *** 1,5 **** #region LGPL License /* ! MagicAjax Library Copyright (C) 2005 MagicAjax Project Team --- 1,5 ---- #region LGPL License /* ! MagicAjax.NET Framework Copyright (C) 2005 MagicAjax Project Team Index: IFormDataLoadedEventHandler.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/Interfaces/IFormDataLoadedEventHandler.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IFormDataLoadedEventHandler.cs 14 Nov 2005 18:50:43 -0000 1.2 --- IFormDataLoadedEventHandler.cs 18 Nov 2005 18:53:07 -0000 1.3 *************** *** 1,5 **** #region LGPL License /* ! MagicAjax Library Copyright (C) 2005 MagicAjax Project Team --- 1,5 ---- #region LGPL License /* ! MagicAjax.NET Framework Copyright (C) 2005 MagicAjax Project Team Index: IPreWriteScriptEventHandler.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/Interfaces/IPreWriteScriptEventHandler.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IPreWriteScriptEventHandler.cs 11 Nov 2005 06:17:49 -0000 1.1 --- IPreWriteScriptEventHandler.cs 18 Nov 2005 18:53:07 -0000 1.2 *************** *** 1,5 **** #region LGPL License /* ! MagicAjax Library Copyright (C) 2005 MagicAjax Project Team --- 1,5 ---- #region LGPL License /* ! MagicAjax.NET Framework Copyright (C) 2005 MagicAjax Project Team Index: IScriptWriter.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/Interfaces/IScriptWriter.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IScriptWriter.cs 14 Nov 2005 18:50:43 -0000 1.2 --- IScriptWriter.cs 18 Nov 2005 18:53:07 -0000 1.3 *************** *** 1,5 **** #region LGPL License /* ! MagicAjax Library Copyright (C) 2005 MagicAjax Project Team --- 1,5 ---- #region LGPL License /* ! MagicAjax.NET Framework Copyright (C) 2005 MagicAjax Project Team |
From: Argiris K. <be...@us...> - 2005-11-18 18:53:16
|
Update of /cvsroot/magicajax/magicajax/Core/script In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20616/Core/script Modified Files: AjaxCallObject.js Log Message: Changed 'MagicAjax library' to 'framework' as this is more appropriate. Fixed a bug of ExtendedRendering for 'NoStore'. Index: AjaxCallObject.js =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/script/AjaxCallObject.js,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AjaxCallObject.js 18 Nov 2005 17:46:17 -0000 1.8 --- AjaxCallObject.js 18 Nov 2005 18:53:07 -0000 1.9 *************** *** 483,487 **** } ! // It's used by AjaxPanel Session and Cache mode AjaxCallObject.prototype.ExtendedSetHtmlOfElementScript = function(html, elementID) { --- 483,487 ---- } ! // It's used by AjaxPanel AjaxCallObject.prototype.ExtendedSetHtmlOfElementScript = function(html, elementID) { |
From: Argiris K. <be...@us...> - 2005-11-18 18:53:16
|
Update of /cvsroot/magicajax/magicajax/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20616/Core Modified Files: AjaxCallHelper.cs AssemblyInfo.cs MagicAjaxModule.cs Log Message: Changed 'MagicAjax library' to 'framework' as this is more appropriate. Fixed a bug of ExtendedRendering for 'NoStore'. Index: AjaxCallHelper.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/AjaxCallHelper.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** AjaxCallHelper.cs 18 Nov 2005 10:29:03 -0000 1.5 --- AjaxCallHelper.cs 18 Nov 2005 18:53:07 -0000 1.6 *************** *** 1,5 **** #region LGPL License /* ! MagicAjax Library Copyright (C) 2005 MagicAjax Project Team --- 1,5 ---- #region LGPL License /* ! MagicAjax.NET Framework Copyright (C) 2005 MagicAjax Project Team Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/AssemblyInfo.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AssemblyInfo.cs 15 Nov 2005 14:07:31 -0000 1.3 --- AssemblyInfo.cs 18 Nov 2005 18:53:07 -0000 1.4 *************** *** 10,14 **** // associated with an assembly. // ! [assembly: AssemblyTitle("MagicAjax.NET Library")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] --- 10,14 ---- // associated with an assembly. // ! [assembly: AssemblyTitle("MagicAjax.NET Framework")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] Index: MagicAjaxModule.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxModule.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** MagicAjaxModule.cs 18 Nov 2005 16:04:15 -0000 1.14 --- MagicAjaxModule.cs 18 Nov 2005 18:53:07 -0000 1.15 *************** *** 1,5 **** #region LGPL License /* ! MagicAjax Library Copyright (C) 2005 MagicAjax Project Team --- 1,5 ---- #region LGPL License /* ! MagicAjax.NET Framework Copyright (C) 2005 MagicAjax Project Team |
From: Argiris K. <be...@us...> - 2005-11-18 18:53:16
|
Update of /cvsroot/magicajax/magicajax/CustomControls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20616/CustomControls Modified Files: CustomControls.csproj Log Message: Changed 'MagicAjax library' to 'framework' as this is more appropriate. Fixed a bug of ExtendedRendering for 'NoStore'. Index: CustomControls.csproj =================================================================== RCS file: /cvsroot/magicajax/magicajax/CustomControls/CustomControls.csproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CustomControls.csproj 11 Nov 2005 06:17:49 -0000 1.1 --- CustomControls.csproj 18 Nov 2005 18:53:07 -0000 1.2 *************** *** 77,89 **** <Reference Name = "System.XML" ! AssemblyName = "System.XML" HintPath = "..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" /> <Reference - Name = "MagicAjax" - Project = "{AA715D85-7870-43CD-AC29-67DCA0AF340A}" - Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" - /> - <Reference Name = "System.Design" AssemblyName = "System.Design" --- 77,84 ---- <Reference Name = "System.XML" ! AssemblyName = "System.Xml" HintPath = "..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" /> <Reference Name = "System.Design" AssemblyName = "System.Design" *************** *** 100,103 **** --- 95,103 ---- HintPath = "..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Web.dll" /> + <Reference + Name = "MagicAjax" + Project = "{AA715D85-7870-43CD-AC29-67DCA0AF340A}" + Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" + /> </References> </Build> |