From: Argiris K. <be...@us...> - 2005-11-14 18:50:55
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Controls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30932/Core/UI/Controls Modified Files: AjaxPanel.cs Log Message: Replaced all "CallBack" references by "AjaxCall" Index: AjaxPanel.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxPanel.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AjaxPanel.cs 11 Nov 2005 06:17:49 -0000 1.1 --- AjaxPanel.cs 14 Nov 2005 18:50:43 -0000 1.2 *************** *** 31,48 **** { /// <summary> ! /// Defines the CallBack connection types. /// </summary> ! public enum CallBackConnectionType { /// <summary> ! /// Client will not invoke a CallBack /// </summary> None, /// <summary> ! /// Asynchronous CallBack /// </summary> Asynchronous, /// <summary> ! /// Synchronous CallBack /// </summary> Synchronous --- 31,48 ---- { /// <summary> ! /// Defines the AjaxCall connection types. /// </summary> ! public enum AjaxCallConnectionType { /// <summary> ! /// Client will not invoke an AjaxCall /// </summary> None, /// <summary> ! /// Asynchronous AjaxCall /// </summary> Asynchronous, /// <summary> ! /// Synchronous AjaxCall /// </summary> Synchronous *************** *** 64,68 **** /// rendering of the child-AjaxPanel, but instead the child-AjaxPanel will send only /// the html of the altered control. Thus, the size of javascript code that the client ! /// gets as a response of a callback, is greatly reduced. /// /// It is not necessary to put all the controls of the page inside an AjaxPanel. Only --- 64,68 ---- /// rendering of the child-AjaxPanel, but instead the child-AjaxPanel will send only /// the html of the altered control. Thus, the size of javascript code that the client ! /// gets as a response of an AjaxCall, is greatly reduced. /// /// It is not necessary to put all the controls of the page inside an AjaxPanel. Only *************** *** 78,82 **** #region Fields ! private CallBackConnectionType _callBackConnection = CallBackConnectionType.Asynchronous; private ArrayList _addedControls = new ArrayList(); private ArrayList _removedControls = new ArrayList(); --- 78,82 ---- #region Fields ! private AjaxCallConnectionType _ajaxCallConnection = AjaxCallConnectionType.Asynchronous; private ArrayList _addedControls = new ArrayList(); private ArrayList _removedControls = new ArrayList(); *************** *** 102,132 **** #region Properties ! #region CallBackConnection /// <summary> ! /// Defines the connection type (a/synchronous) that will be utilized for a CallBack. ! /// Default is CallBackConnectionType.Asynchronous. /// </summary> ! public CallBackConnectionType CallBackConnection { get { ! return _callBackConnection; } set { ! _callBackConnection = value; ! switch (_callBackConnection) { ! case CallBackConnectionType.None: ! this.Attributes.Remove ("CallBack"); break; ! case CallBackConnectionType.Asynchronous: ! this.Attributes["CallBack"] = "async"; break; ! case CallBackConnectionType.Synchronous: ! this.Attributes["CallBack"] = "sync"; break; } --- 102,132 ---- #region Properties ! #region AjaxCallConnection /// <summary> ! /// Defines the connection type (a/synchronous) that will be utilized for an AjaxCall. ! /// Default is AjaxCallConnectionType.Asynchronous. /// </summary> ! public AjaxCallConnectionType AjaxCallConnection { get { ! return _ajaxCallConnection; } set { ! _ajaxCallConnection = value; ! switch (_ajaxCallConnection) { ! case AjaxCallConnectionType.None: ! this.Attributes.Remove ("AjaxCall"); break; ! case AjaxCallConnectionType.Asynchronous: ! this.Attributes["AjaxCall"] = "async"; break; ! case AjaxCallConnectionType.Synchronous: ! this.Attributes["AjaxCall"] = "sync"; break; } *************** *** 217,224 **** _noVerifyPage.EnableValidation = (Page.Validators.Count > 0); ! if (this.Attributes["CallBack"] == null) { ! // To set the appropriate "CallBack" attribute. ! this.CallBackConnection = this._callBackConnection; } } --- 217,224 ---- _noVerifyPage.EnableValidation = (Page.Validators.Count > 0); ! if (this.Attributes["AjaxCall"] == null) { ! // To set the appropriate "AjaxCall" attribute. ! this.AjaxCallConnection = this._ajaxCallConnection; } } *************** *** 266,270 **** protected override void RenderChildren(HtmlTextWriter writer) { ! if ( CallBackHelper.IsCallBack && IsPageNoStoreMode ) { LoadControlState(); --- 266,270 ---- protected override void RenderChildren(HtmlTextWriter writer) { ! if ( AjaxCallHelper.IsAjaxCall && IsPageNoStoreMode ) { LoadControlState(); *************** *** 411,415 **** { string html = sbFull.ToString(); ! CallBackHelper.WriteSetHtmlOfElementScript (html, ClientID); output.Write (html); } --- 411,415 ---- { string html = sbFull.ToString(); ! AjaxCallHelper.WriteSetHtmlOfElementScript (html, ClientID); output.Write (html); } *************** *** 420,424 **** { _controlHtmls.Remove (con); ! CallBackHelper.WriteRemoveElementScript (ClientID, GetAjaxElemID(con)); } --- 420,424 ---- { _controlHtmls.Remove (con); ! AjaxCallHelper.WriteRemoveElementScript (ClientID, GetAjaxElemID(con)); } *************** *** 436,440 **** html = sbFull.ToString(); ! CallBackHelper.WriteAddElementScript (ClientID, "span", GetAjaxElemID(con), html, GetNextExistingElement(i)); output.Write (html); --- 436,440 ---- html = sbFull.ToString(); ! AjaxCallHelper.WriteAddElementScript (ClientID, "span", GetAjaxElemID(con), html, GetNextExistingElement(i)); output.Write (html); *************** *** 484,488 **** private void ExtendedWriteSetHtmlOfElementScript(string html, string elementID) { ! CallBackHelper.Write( String.Format("AJAXCbo.ExtendedSetHtmlOfElementScript({0},\"{1}\");\r\n", CallBackHelper.EncodeString(html), elementID) ); } #endregion --- 484,488 ---- private void ExtendedWriteSetHtmlOfElementScript(string html, string elementID) { ! AjaxCallHelper.Write( String.Format("AJAXCbo.ExtendedSetHtmlOfElementScript({0},\"{1}\");\r\n", AjaxCallHelper.EncodeString(html), elementID) ); } #endregion *************** *** 600,604 **** // so that ':' is used for Unique ID separator instead of '$', // thus javascript to convert the Unique IDs of the page won't be sent ! // at the first CallBack. // Try not using DisableVerify at all if it's IsPageNoStoreMode --- 600,604 ---- // so that ':' is used for Unique ID separator instead of '$', // thus javascript to convert the Unique IDs of the page won't be sent ! // at the first AjaxCall. // Try not using DisableVerify at all if it's IsPageNoStoreMode |