From: Argiris K. <be...@us...> - 2005-11-14 18:50:55
|
Update of /cvsroot/magicajax/magicajax/Core/UI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30932/Core/UI Modified Files: AjaxControl.cs AjaxPage.cs AjaxUserControl.cs RenderedByScriptControl.cs Log Message: Replaced all "CallBack" references by "AjaxCall" Index: AjaxUserControl.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/AjaxUserControl.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AjaxUserControl.cs 11 Nov 2005 06:17:49 -0000 1.1 --- AjaxUserControl.cs 14 Nov 2005 18:50:43 -0000 1.2 *************** *** 26,51 **** { /// <summary> ! /// Includes the CallBack event, Context, Request and Response, for convenience. /// </summary> /// <remarks> ! /// You can implement the ICallBackEventHandler on your usercontrol to handle the ! /// CallBack event, and use the HttpContext.Current, CallBackHelper.Request and ! /// CallBackHelper.Response properties. /// /// You cannot use the Context, Request and Response of the System.Web.UI.UserControl ! /// because, during a CallBack, the Context of the page is invalid. If you don't want /// to replace the UserControl.Request and UserControl.Response from your code for ! /// CallBackHelper.Request and CallBackHelper.Response, and your usercontrol is inherited /// from System.Web.UI.UserControl, you can use AjaxUserControl for convenience. /// </remarks> ! public class AjaxUserControl : System.Web.UI.UserControl, ICallBackEventHandler { /// <summary> ! /// Raised by MagicAjaxModule when a CallBack occurs /// </summary> ! public event EventHandler CallBack; /// <summary> ! /// The base UserControl Request property doesn't work during a CallBack. Use this instead. /// </summary> public new HttpRequest Request --- 26,51 ---- { /// <summary> ! /// Includes the AjaxCall event, Context, Request and Response, for convenience. /// </summary> /// <remarks> ! /// You can implement the IAjaxCallEventHandler on your usercontrol to handle the ! /// AjaxCall event, and use the HttpContext.Current, AjaxCallHelper.Request and ! /// AjaxCallHelper.Response properties. /// /// You cannot use the Context, Request and Response of the System.Web.UI.UserControl ! /// because, during an AjaxCall, the Context of the page is invalid. If you don't want /// to replace the UserControl.Request and UserControl.Response from your code for ! /// AjaxCallHelper.Request and AjaxCallHelper.Response, and your usercontrol is inherited /// from System.Web.UI.UserControl, you can use AjaxUserControl for convenience. /// </remarks> ! public class AjaxUserControl : System.Web.UI.UserControl, IAjaxCallEventHandler { /// <summary> ! /// Raised by MagicAjaxModule when an AjaxCall occurs /// </summary> ! public event EventHandler AjaxCall; /// <summary> ! /// The base UserControl Request property doesn't work during an AjaxCall. Use this instead. /// </summary> public new HttpRequest Request *************** *** 58,62 **** /// <summary> ! /// The base UserControl Response property doesn't work during a CallBack. Use this instead. /// </summary> public new HttpResponse Response --- 58,62 ---- /// <summary> ! /// The base UserControl Response property doesn't work during an AjaxCall. Use this instead. /// </summary> public new HttpResponse Response *************** *** 69,80 **** /// <summary> ! /// Raises the CallBack event. /// </summary> /// <remarks> /// Called by MagicAjaxModule. /// </remarks> ! public void RaiseCallBackEvent() { ! OnCallBack (EventArgs.Empty); } --- 69,80 ---- /// <summary> ! /// Raises the AjaxCall event. /// </summary> /// <remarks> /// Called by MagicAjaxModule. /// </remarks> ! public void RaiseAjaxCallEvent() { ! OnAjaxCall (EventArgs.Empty); } *************** *** 87,94 **** } ! protected virtual void OnCallBack(EventArgs e) { ! if (CallBack != null) ! CallBack(this, e); } } --- 87,94 ---- } ! protected virtual void OnAjaxCall(EventArgs e) { ! if (AjaxCall != null) ! AjaxCall(this, e); } } Index: AjaxPage.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/AjaxPage.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AjaxPage.cs 11 Nov 2005 06:17:49 -0000 1.1 --- AjaxPage.cs 14 Nov 2005 18:50:43 -0000 1.2 *************** *** 26,52 **** { /// <summary> ! /// Includes the CallBack event, Context, Request and Response, for convenience. /// </summary> /// <remarks> /// Inhering from AjaxPage is not required to apply AJAX on your pages. You can ! /// implement the ICallBackEventHandler on your page to handle the CallBack event, and ! /// use the HttpContext.Current, CallBackHelper.Request and CallBackHelper.Response /// properties. /// /// You cannot use the Context, Request and Response of the System.Web.UI.Page ! /// because, during a CallBack, the Context of the page is invalid. If you don't want /// to replace the Page.Request and Page.Response from your code for ! /// CallBackHelper.Request and CallBackHelper.Response, and your page is inherited /// from System.Web.UI.Page, you can use AjaxPage for convenience. /// </remarks> ! public class AjaxPage : System.Web.UI.Page, ICallBackEventHandler { /// <summary> ! /// Raised by MagicAjaxModule when a CallBack occurs /// </summary> ! public event EventHandler CallBack; /// <summary> ! /// The base Page Request property doesn't work during a CallBack. Use this instead. /// </summary> public new HttpRequest Request --- 26,52 ---- { /// <summary> ! /// Includes the AjaxCall event, Context, Request and Response, for convenience. /// </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, and ! /// use the HttpContext.Current, AjaxCallHelper.Request and AjaxCallHelper.Response /// properties. /// /// You cannot use the Context, Request and Response of the System.Web.UI.Page ! /// because, during an AjaxCall, the Context of the page is invalid. If you don't want /// to replace the Page.Request and Page.Response from your code for ! /// AjaxCallHelper.Request and AjaxCallHelper.Response, and your page is inherited /// from System.Web.UI.Page, you can use AjaxPage for convenience. /// </remarks> ! public class AjaxPage : System.Web.UI.Page, IAjaxCallEventHandler { /// <summary> ! /// Raised by MagicAjaxModule when an AjaxCall occurs /// </summary> ! public event EventHandler AjaxCall; /// <summary> ! /// The base Page Request property doesn't work during an AjaxCall. Use this instead. /// </summary> public new HttpRequest Request *************** *** 59,63 **** /// <summary> ! /// The base Page Response property doesn't work during a CallBack. Use this instead. /// </summary> public new HttpResponse Response --- 59,63 ---- /// <summary> ! /// The base Page Response property doesn't work during an AjaxCall. Use this instead. /// </summary> public new HttpResponse Response *************** *** 70,81 **** /// <summary> ! /// Raises the CallBack event. /// </summary> /// <remarks> /// Called by MagicAjaxModule. /// </remarks> ! public void RaiseCallBackEvent() { ! OnCallBack (EventArgs.Empty); } --- 70,81 ---- /// <summary> ! /// Raises the AjaxCall event. /// </summary> /// <remarks> /// Called by MagicAjaxModule. /// </remarks> ! public void RaiseAjaxCallEvent() { ! OnAjaxCall (EventArgs.Empty); } *************** *** 88,95 **** } ! protected virtual void OnCallBack(EventArgs e) { ! if (CallBack != null) ! CallBack(this, e); } } --- 88,95 ---- } ! protected virtual void OnAjaxCall(EventArgs e) { ! if (AjaxCall != null) ! AjaxCall(this, e); } } Index: AjaxControl.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/AjaxControl.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AjaxControl.cs 11 Nov 2005 06:17:49 -0000 1.1 --- AjaxControl.cs 14 Nov 2005 18:50:43 -0000 1.2 *************** *** 28,46 **** { /// <summary> ! /// The base control for controls to get notified for callback events from the client. /// </summary> ! public class AjaxControl : System.Web.UI.WebControls.WebControl, ICallBackEventHandler { /// <summary> /// Raised by the MagicAjaxModule. /// </summary> ! public event EventHandler CallBack; /// <summary> ! /// Implements the ICallBackEventHandler interface. It is called by the MagicAjaxModule. /// </summary> ! public void RaiseCallBackEvent() { ! OnCallBack(EventArgs.Empty); } --- 28,46 ---- { /// <summary> ! /// The base control for controls to get notified for AjaxCall events from the client. /// </summary> ! public class AjaxControl : System.Web.UI.WebControls.WebControl, IAjaxCallEventHandler { /// <summary> /// Raised by the MagicAjaxModule. /// </summary> ! public event EventHandler AjaxCall; /// <summary> ! /// Implements the IAjaxCallEventHandler interface. It is called by the MagicAjaxModule. /// </summary> ! public void RaiseAjaxCallEvent() { ! OnAjaxCall(EventArgs.Empty); } *************** *** 59,71 **** protected override void OnPreRender(EventArgs e) { ! // Register 'CallBackObject.js' script MagicAjaxModule.Instance.EnableAjaxOnPage(this.Page); base.OnPreRender (e); } ! protected virtual void OnCallBack(EventArgs e) { ! if (CallBack != null) ! CallBack(this, e); } } --- 59,71 ---- protected override void OnPreRender(EventArgs e) { ! // Register 'AjaxCallObject.js' script MagicAjaxModule.Instance.EnableAjaxOnPage(this.Page); base.OnPreRender (e); } ! protected virtual void OnAjaxCall(EventArgs e) { ! if (AjaxCall != null) ! AjaxCall(this, e); } } Index: RenderedByScriptControl.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/RenderedByScriptControl.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RenderedByScriptControl.cs 11 Nov 2005 06:17:49 -0000 1.1 --- RenderedByScriptControl.cs 14 Nov 2005 18:50:43 -0000 1.2 *************** *** 62,66 **** /// <summary> /// This control manages its appearance on the page using javascript that sends ! /// to the client during a CallBack. /// </summary> /// <remarks> --- 62,66 ---- /// <summary> /// This control manages its appearance on the page using javascript that sends ! /// to the client during an AjaxCall. /// </summary> /// <remarks> *************** *** 89,97 **** set { ! if ( CallBackHelper.IsCallBack && IsRenderedOnPage && MonitorVisibilityState && value != base.Visible ) ! CallBackHelper.WriteSetVisibilityOfElementScript (ClientID, value); base.Visible = value; --- 89,97 ---- set { ! if ( AjaxCallHelper.IsAjaxCall && IsRenderedOnPage && MonitorVisibilityState && value != base.Visible ) ! AjaxCallHelper.WriteSetVisibilityOfElementScript (ClientID, value); base.Visible = value; *************** *** 116,126 **** /// <summary> /// Gets or sets whether every time "Visible" property is changed ! /// CallBackHelper.WriteSetVisibilityOfElementScript method should be called. /// Default is true. /// </summary> /// <remarks> /// If this property is true, every time you change the "Visible" property during a ! /// CallBack, the display attribute of the style of the control on the page will ! /// be set to "" or "none" by calling the CallBackHelper.WriteSetVisibilityOfElementScript /// method. /// </remarks> --- 116,126 ---- /// <summary> /// Gets or sets whether every time "Visible" property is changed ! /// AjaxCallHelper.WriteSetVisibilityOfElementScript method should be called. /// Default is true. /// </summary> /// <remarks> /// If this property is true, every time you change the "Visible" property during a ! /// AjaxCall, the display attribute of the style of the control on the page will ! /// be set to "" or "none" by calling the AjaxCallHelper.WriteSetVisibilityOfElementScript /// method. /// </remarks> *************** *** 156,160 **** /// <remarks> /// The RenderedByScriptControl can be normally rendered by the Render method ! /// even during a CallBack (i.e when all the controls of an AjaxPanel is new /// and the AjaxPanel renders all of them in a single html rendering). /// In this case it's not necessary to send any javascript to the client. --- 156,160 ---- /// <remarks> /// The RenderedByScriptControl can be normally rendered by the Render method ! /// even during an AjaxCall (i.e when all the controls of an AjaxPanel is new /// and the AjaxPanel renders all of them in a single html rendering). /// In this case it's not necessary to send any javascript to the client. *************** *** 165,172 **** } ! protected override void OnCallBack(EventArgs e) { _isHtmlRendered = false; ! base.OnCallBack(e); } --- 165,172 ---- } ! protected override void OnAjaxCall(EventArgs e) { _isHtmlRendered = false; ! base.OnAjaxCall(e); } *************** *** 273,277 **** { Control con = FindNextVisibleSibling(); ! CallBackHelper.WriteAddElementScript (Parent.ClientID, this.GetTagName(), this.ClientID, "", (con == null) ? null : con.ClientID); } --- 273,277 ---- { Control con = FindNextVisibleSibling(); ! AjaxCallHelper.WriteAddElementScript (Parent.ClientID, this.GetTagName(), this.ClientID, "", (con == null) ? null : con.ClientID); } *************** *** 287,291 **** if(_currentTagHtml != html) { ! CallBackHelper.WriteSetAttributesOfControl (ClientID, FormatAttributes(html)); _currentTagHtml = html; } --- 287,291 ---- if(_currentTagHtml != html) { ! AjaxCallHelper.WriteSetAttributesOfControl (ClientID, FormatAttributes(html)); _currentTagHtml = html; } *************** *** 334,338 **** /// <summary> /// It finds the attributes from the html of the control's tag, and formats them ! /// so that they are send by CallBackHelper.WriteSetAttributesOfControl method. /// </summary> /// <param name="html">The html tag of the control</param> --- 334,338 ---- /// <summary> /// It finds the attributes from the html of the control's tag, and formats them ! /// so that they are send by AjaxCallHelper.WriteSetAttributesOfControl method. /// </summary> /// <param name="html">The html tag of the control</param> |