Update of /cvsroot/magicajax/magicajax/Core/UI/Controls
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7486/Core/UI/Controls
Modified Files:
AjaxPanel.cs AjaxZone.cs
Log Message:
A bit of refactoring for the ajax events handling.
--AjaxCall event is renamed to AjaxCallStart
--AjaxControl/AjaxPage/AjaxUserControl invoke AjaxCallStart at Load event, PreWriteScript at PreRender, and AjaxCallEnd at Unload, during an Ajax callback
--Some minor modifications to make extending AjaxControl a bit easier.
Index: AjaxPanel.cs
===================================================================
RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxPanel.cs,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** AjaxPanel.cs 21 Dec 2005 00:40:23 -0000 1.42
--- AjaxPanel.cs 22 Dec 2005 01:15:20 -0000 1.43
***************
*** 164,173 ****
base.OnLoad (e);
- if (this.Attributes["AjaxCall"] == null)
- {
- // To set the appropriate "AjaxCall" attribute.
- this.AjaxCallConnection = this._ajaxCallConnection;
- }
-
if ( this.MagicAjaxContext.IsBrowserSupported )
{
--- 164,167 ----
***************
*** 185,208 ****
#endregion
! #region override OnPreRender
! protected override void OnPreRender(EventArgs e)
! {
! base.OnPreRender (e);
! SetAjaxAttributes();
! }
! #endregion
!
! #region override OnPreWriteScript
! protected override void OnPreWriteScript(EventArgs e)
! {
! base.OnPreWriteScript (e);
! SetAjaxAttributes();
! }
! #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
--- 179,186 ----
#endregion
! #region override OnAjaxCallEnd
! protected override void OnAjaxCallEnd(EventArgs e)
{
! if ( IsPageNoStoreMode && IsRenderedOnPage)
{
// Verify that it is indeed rendered on page. If it's not, set its
***************
*** 212,216 ****
}
! base.OnUnload (e);
}
#endregion
--- 190,194 ----
}
! base.OnAjaxCallEnd (e);
}
#endregion
***************
*** 329,333 ****
#endregion
! protected virtual void SetAjaxAttributes()
{
switch (_ajaxCallConnection)
--- 307,311 ----
#endregion
! protected override void SetAjaxAttributes()
{
switch (_ajaxCallConnection)
Index: AjaxZone.cs
===================================================================
RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxZone.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** AjaxZone.cs 18 Dec 2005 16:44:46 -0000 1.1
--- AjaxZone.cs 22 Dec 2005 01:15:20 -0000 1.2
***************
*** 44,48 ****
private ExcludeFromPostFlag _excludeFlags = ExcludeFromPostFlag.None;
! [Bindable(false),
Category("Behaviour"),
DefaultValue(ExcludeFromPostFlag.None)]
--- 44,48 ----
private ExcludeFromPostFlag _excludeFlags = ExcludeFromPostFlag.None;
! [Bindable(false),
Category("Behaviour"),
DefaultValue(ExcludeFromPostFlag.None)]
***************
*** 70,74 ****
{
base.OnLoad (e);
! this.Attributes["AjaxType"] = "ajaxzone";
}
}
--- 70,74 ----
{
base.OnLoad (e);
! this.Attributes["AjaxLocalScope"] = "true";
}
}
|