Author: krasnov
Date: 2006-11-13 10:36:24 -0500 (Mon, 13 Nov 2006)
New Revision: 67759

Modified:
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/Login.cs
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/LoginView.cs
Log:
* Login.cs: fixed CreateChildControls, throws exception if needed control not 
found
* LoginView.cs: fixed CreateChildControls, check templates for null


Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog      
2006-11-13 14:58:08 UTC (rev 67758)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog      
2006-11-13 15:36:24 UTC (rev 67759)
@@ -1,5 +1,11 @@
 2006-11-13  Vladimir Krasnov  <[EMAIL PROTECTED]>
 
+       * Login.cs: fixed CreateChildControls, throws exception if needed
+       control not found
+       * LoginView.cs: fixed CreateChildControls, check templates for null
+
+2006-11-13  Vladimir Krasnov  <[EMAIL PROTECTED]>
+
        * Wizard.cs: fixed ActiveStepIndex property, fixed SideBar button
        rendering, fixed history updating
        * WizardStepCollection.cs: fixed implemented interfaces

Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/Login.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/Login.cs       
2006-11-13 14:58:08 UTC (rev 67758)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/Login.cs       
2006-11-13 15:36:24 UTC (rev 67759)
@@ -1080,17 +1080,20 @@
                                editable.Text = UserName;
                                editable.TextChanged += new EventHandler 
(UserName_TextChanged);
                        }
+                       else
+                               throw new HttpException ("LayoutTemplate does 
not contain an IEditableTextControl with ID UserName for the username.");
 
                        editable = container.PasswordTextBox as 
IEditableTextControl;
 
                        if (editable != null)
                                editable.TextChanged += new EventHandler 
(Password_TextChanged);
+                       else
+                               throw new HttpException ("LayoutTemplate does 
not contain an IEditableTextControl with ID Password for the password.");
 
                        ICheckBoxControl checkBox = 
container.RememberMeCheckBox as ICheckBoxControl;
 
                        if (checkBox != null)
                                checkBox.CheckedChanged += new EventHandler 
(RememberMe_CheckedChanged);
-                       
                }
 
                protected override void LoadViewState (object savedState)

Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/LoginView.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/LoginView.cs   
2006-11-13 14:58:08 UTC (rev 67758)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/LoginView.cs   
2006-11-13 15:36:24 UTC (rev 67759)
@@ -121,17 +121,21 @@
                        }
                }
 
-               [MonoTODO("Handle RoleGroups")]
+               [MonoTODO ("Handle RoleGroups")]
                protected internal override void CreateChildControls ()
                {
-                       Controls.Clear();
-                       Control c = new Control();
-                       if (IsAuthenticated)
-                               LoggedInTemplate.InstantiateIn (c);
-                       else
-                               AnonymousTemplate.InstantiateIn (c);
+                       Controls.Clear ();
+                       Control c = new Control ();
+                       if (IsAuthenticated) {
+                               if (LoggedInTemplate != null)
+                                       LoggedInTemplate.InstantiateIn (c);
+                       }
+                       else {
+                               if (AnonymousTemplate != null)
+                                       AnonymousTemplate.InstantiateIn (c);
+                       }
 
-                       Controls.Add(c);
+                       Controls.Add (c);
                }
 
                public override void DataBind ()

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

Reply via email to