From: Argiris K. <be...@us...> - 2005-12-05 18:44:38
|
Update of /cvsroot/magicajax/magicajax/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13470/Core Modified Files: MagicAjaxModule.cs Util.cs Log Message: If the html fingerprint of a 'html holder' doesn't change, AjaxPanel 'reflects' the form controls to the client. Index: Util.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/Util.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Util.cs 4 Dec 2005 03:25:15 -0000 1.13 --- Util.cs 5 Dec 2005 18:44:31 -0000 1.14 *************** *** 138,142 **** } ! public static ArrayList GetChildControlsOfType (Control parentControl, Type type, bool onlyVisible) { ArrayList list = new ArrayList(); --- 138,150 ---- } ! /// <summary> ! /// Gets all child controls of a specific type. ! /// </summary> ! /// <param name="parentControl">Control to search</param> ! /// <param name="searchType">The type to search for</param> ! /// <param name="notRecursiveType">If not null, the child controls of this type are not searched</param> ! /// <param name="onlyVisible">if true gets only the visible controls</param> ! /// <returns></returns> ! public static ArrayList GetChildControlsOfType (Control parentControl, Type searchType, Type notRecursiveType, bool onlyVisible) { ArrayList list = new ArrayList(); *************** *** 148,155 **** continue; ! if ( type.IsInstanceOfType(con) ) list.Add (con); ! list.AddRange (GetChildControlsOfType(con, type, onlyVisible)); } --- 156,164 ---- continue; ! if ( searchType.IsInstanceOfType(con) ) list.Add (con); ! if ( notRecursiveType == null || !notRecursiveType.IsInstanceOfType(con) ) ! list.AddRange (GetChildControlsOfType(con, searchType, notRecursiveType, onlyVisible)); } Index: MagicAjaxModule.cs =================================================================== RCS file: /cvsroot/magicajax/magicajax/Core/MagicAjaxModule.cs,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** MagicAjaxModule.cs 2 Dec 2005 08:25:10 -0000 1.38 --- MagicAjaxModule.cs 5 Dec 2005 18:44:31 -0000 1.39 *************** *** 576,580 **** { // Restore the validators ! ArrayList validators = Util.GetChildControlsOfType(_magicAjaxContext.StoredPageInfo.Page, typeof(IValidator), false); foreach (IValidator valid in validators) _magicAjaxContext.StoredPageInfo.Page.Validators.Add(valid); --- 576,580 ---- { // Restore the validators ! ArrayList validators = Util.GetChildControlsOfType(_magicAjaxContext.StoredPageInfo.Page, typeof(IValidator), null, false); foreach (IValidator valid in validators) _magicAjaxContext.StoredPageInfo.Page.Validators.Add(valid); |