Author: igorz
Date: 2006-11-08 09:31:21 -0500 (Wed, 08 Nov 2006)
New Revision: 67526

Modified:
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/DataBoundControl.cs
   trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
   
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataBoundControlTest.cs
Log:
2006-11-09 Igor Zelmanovich <[EMAIL PROTECTED]>

        * DataBoundControl.cs: fixed: 
        ConfirmInitState method s called by 
        the DataBoundControl class in its OnLoad method.



Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog      
2006-11-08 14:27:05 UTC (rev 67525)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog      
2006-11-08 14:31:21 UTC (rev 67526)
@@ -1,3 +1,9 @@
+2006-11-09 Igor Zelmanovich <[EMAIL PROTECTED]>
+
+       * DataBoundControl.cs: fixed: 
+       ConfirmInitState method s called by 
+       the DataBoundControl class in its OnLoad method.
+
 2006-11-06 Igor Zelmanovich <[EMAIL PROTECTED]>
 
        * FormView.cs: fixed: DataBinding flow.

Modified: 
trunk/mcs/class/System.Web/System.Web.UI.WebControls/DataBoundControl.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/DataBoundControl.cs    
2006-11-08 14:27:05 UTC (rev 67525)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/DataBoundControl.cs    
2006-11-08 14:31:21 UTC (rev 67526)
@@ -146,6 +146,10 @@
                        if (!Page.IsPostBack || (IsViewStateEnabled && 
!IsDataBound))
                                RequiresDataBinding = true;
 
+                       // MSDN: The ConfirmInitState method sets the 
initialized state of the data-bound 
+                       // control. The method is called by the 
DataBoundControl class in its OnLoad method.
+                       ConfirmInitState ();
+
                        base.OnLoad(e);
                }
                
@@ -245,3 +249,4 @@
 
 
 
+

Modified: trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog 
2006-11-08 14:27:05 UTC (rev 67525)
+++ trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog 
2006-11-08 14:31:21 UTC (rev 67526)
@@ -1,3 +1,7 @@
+2006-11-09  Igor Zelmanovich   <[EMAIL PROTECTED]>
+
+       * DataBoundControlTest.cs: added test.
+
 2006-11-07 Andrew Skiba <[EMAIL PROTECTED]>
 
        * HyperLinkFieldTest.cs, SiteMapDataSourceTest.cs, ThemeTest.cs,

Modified: 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataBoundControlTest.cs
===================================================================
--- 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataBoundControlTest.cs
   2006-11-08 14:27:05 UTC (rev 67525)
+++ 
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataBoundControlTest.cs
   2006-11-08 14:31:21 UTC (rev 67526)
@@ -55,6 +55,11 @@
                        {
                                ValidateDataSource (dataSource);
                        }
+                       
+                       public bool GetInitialized ()
+                       {
+                               return Initialized;
+                       }
                }
 
                class MyDataBoundControl : DataBoundControl
@@ -199,6 +204,34 @@
                        // Allows null
                        p.DoValidateDataSource (null);
                }
+
+               // MSDN: The ConfirmInitState method sets the initialized state 
of the data-bound 
+               // control. The method is called by the DataBoundControl class 
in its OnLoad method.
+               [Test]
+               [Category ("NunitWeb")]
+               public void Initialized ()
+               {
+                       WebTest t = new WebTest ();
+                       PageDelegates pd = new PageDelegates ();
+                       pd.Load = Initialized_Load;
+                       pd.PreRenderComplete = Initialized_PreRender;
+                       t.Invoker = new PageInvoker (pd);
+                       t.Run ();
+               }
+
+               public static void Initialized_Load (Page p)
+               {
+                       Poker c = new Poker ();
+                       p.Form.Controls.Clear ();
+                       p.Form.Controls.Add (c);
+                       Assert.IsFalse (c.GetInitialized (), 
"Initialized_Load");
+               }
+
+               public static void Initialized_PreRender (Page p)
+               {
+                       Poker c = (Poker) p.Form.Controls [0];
+                       Assert.IsTrue (c.GetInitialized (), 
"Initialized_PreRender");
+               }
        }
 }
 #endif

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to