From: Dion O. <dol...@us...> - 2006-01-24 22:25:17
|
Update of /cvsroot/magicajax/magicajax/Core/UI/Controls In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20314/magicajax/Core/UI/Controls Modified Files: AjaxPanel.cs Log Message: Moved reflecting of added scripts and hidden fields to Page.PreRenderComplete and Page.UnLoad Index: AjaxPanel.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/UI/Controls/AjaxPanel.cs,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** AjaxPanel.cs 24 Jan 2006 16:30:27 -0000 1.53 --- AjaxPanel.cs 24 Jan 2006 22:25:05 -0000 1.54 *************** *** 287,298 **** } ! // Find the first and last AjaxPanel ! // So later on (on prerender and render) we can do some extra processing ! // before and after rendering of the AjaxPanels. This extra processing involves ! // reflecting hidden fields, scripts and stylesheets that were added/changed ! // on a callback. ! if (Context != null) { ! AjaxCallHelper.TrackFirstOrLastPanel(this.Page, this.ClientID); } } --- 287,304 ---- } ! // Attach to page events (prerendercomplete and unload) so we can do ! // some extra processing before and after rendering of the AjaxPanels. ! // This extra processing involves reflecting hidden fields, scripts and ! // stylesheets that were added/changed on a callback. ! if (Context != null && !Context.Items.Contains("__ATTACHED_PAGE_HANDLERS")) { ! Context.Items.Add("__ATTACHED_PAGE_HANDLERS", String.Empty); ! #if NET_2_0 ! this.Page.PreRenderComplete += new EventHandler(AjaxCallHelper.Page_PreRender); ! #else ! this.Page.PreRender += new EventHandler(AjaxCallHelper.Page_PreRender); ! #endif ! if (MagicAjaxContext.Current.IsAjaxCall) ! this.Page.Unload += new EventHandler(AjaxCallHelper.Page_Unload); } } |