2005-09-09 Chris Toshok <toshok@ximian.com>
authorChris Toshok <toshok@novell.com>
Fri, 9 Sep 2005 20:25:04 +0000 (20:25 -0000)
committerChris Toshok <toshok@novell.com>
Fri, 9 Sep 2005 20:25:04 +0000 (20:25 -0000)
* CheckBox.cs, CheckBoxList.cs, DropDownList.cs, ImageButton.cs,
ListBox.cs, RadioButton.cs, RadioButtonList.cs, TextBox.cs: fix up
LoadPostData/RaisePostDataChangedEvent.

svn path=/trunk/mcs/; revision=49828

mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
mcs/class/System.Web/System.Web.UI.WebControls/CheckBox.cs
mcs/class/System.Web/System.Web.UI.WebControls/CheckBoxList.cs
mcs/class/System.Web/System.Web.UI.WebControls/DropDownList.cs
mcs/class/System.Web/System.Web.UI.WebControls/ImageButton.cs
mcs/class/System.Web/System.Web.UI.WebControls/ListBox.cs
mcs/class/System.Web/System.Web.UI.WebControls/RadioButton.cs
mcs/class/System.Web/System.Web.UI.WebControls/RadioButtonList.cs
mcs/class/System.Web/System.Web.UI.WebControls/TextBox.cs

index e00a06a06ec800e531f5a4aed326c6dc4a1f9889..b8df36eb9f849f8dac2e11075efb912ce714d723 100644 (file)
@@ -1,3 +1,9 @@
+2005-09-09  Chris Toshok  <toshok@ximian.com>
+
+       * CheckBox.cs, CheckBoxList.cs, DropDownList.cs, ImageButton.cs,
+       ListBox.cs, RadioButton.cs, RadioButtonList.cs, TextBox.cs: fix up
+       LoadPostData/RaisePostDataChangedEvent.
+
 2005-09-09  Chris Toshok  <toshok@ximian.com>
 
        * FontInfo.cs (IsEmpty): new internal property, used by
index c50805ac0a6a49321184a5860a4049596bdceff6..c85b3eeb9ed0cf555e8e860e8695673ce05ca2c7 100644 (file)
@@ -431,30 +431,27 @@ namespace System.Web.UI.WebControls {
                        return (false);
                }
 
-               bool IPostBackDataHandler.LoadPostData (string postDataKey, NameValueCollection postCollection)
-               {
-                       return LoadPostData (postDataKey, postCollection);
-               }
-               
 #if NET_2_0
-               protected virtual void RaisePostDataChangedEvent ()
+               protected virtual
+#endif
+               void RaisePostDataChangedEvent ()
                {
+#if NET_2_0
                        if (CausesValidation)
                                Page.Validate (ValidationGroup);
-               
+#endif
                        OnCheckedChanged (EventArgs.Empty);
                }
-               
-               void IPostBackDataHandler.RaisePostDataChangedEvent ()
+
+               bool IPostBackDataHandler.LoadPostData (string postDataKey, NameValueCollection postCollection)
                {
-                       RaisePostDataChangedEvent ();
+                       return LoadPostData (postDataKey, postCollection);
                }
-#else
+               
                void IPostBackDataHandler.RaisePostDataChangedEvent ()
                {
-                       OnCheckedChanged (EventArgs.Empty);
+                       RaisePostDataChangedEvent ();
                }
-#endif
 
                internal virtual void InternalAddAttributesToRender (HtmlTextWriter w)
                {
index 207d1bc5e177f7f989b819bc815caf91700acafb..2acfcfe02e6a678241402ceaecab2e73e3d37d19 100644 (file)
@@ -253,22 +253,13 @@ namespace System.Web.UI.WebControls {
                {
                        throw new NotImplementedException ();
                }
+#endif
 
-               [MonoTODO]
-               protected virtual bool LoadPostData (string postDataKey, NameValueCollection postCollection)
-               {
-                       throw new NotImplementedException ();
-               }
 
-               [MonoTODO]
-               protected virtual void RaisePostDataChangedEvent ()
-               {
-                       throw new NotImplementedException ();
-               }
-#endif         
-
-               bool IPostBackDataHandler.LoadPostData (string postDataKey,
-                               NameValueCollection postCollection)
+#if NET_2_0
+               protected virtual
+#endif
+               bool LoadPostData (string postDataKey, NameValueCollection postCollection)
                {
                        int checkbox = -1;
 
@@ -295,11 +286,25 @@ namespace System.Web.UI.WebControls {
                        return false;
                }
 
-               void IPostBackDataHandler.RaisePostDataChangedEvent ()
+#if NET_2_0
+               protected virtual
+#endif
+               void RaisePostDataChangedEvent ()
                {
                        OnSelectedIndexChanged (EventArgs.Empty);
                }
 
+               bool IPostBackDataHandler.LoadPostData (string postDataKey,
+                                                       NameValueCollection postCollection)
+               {
+                       return LoadPostData (postDataKey, postCollection);
+               }
+
+               void IPostBackDataHandler.RaisePostDataChangedEvent ()
+               {
+                       RaisePostDataChangedEvent ();
+               }
+
                bool IRepeatInfoUser.HasFooter {
                        get { return false; }
                }
index 4f80534411e28e821271a98e7d8a7462009a5b1c..3536988a55d9c2a3345151caeb222bfebb63931f 100644 (file)
@@ -180,20 +180,10 @@ namespace System.Web.UI.WebControls {
 
                #region Interface Methods
 #if NET_2_0
-               [MonoTODO]
-               protected virtual bool LoadPostData (string postDataKey, NameValueCollection postCollection)
+               protected virtual
+#endif
+               bool LoadPostData (string postDataKey, NameValueCollection postCollection)
                {
-                       throw new NotImplementedException ();
-               }
-
-               [MonoTODO]
-               protected virtual void RaisePostDataChangedEvent ()
-               {
-                       throw new NotImplementedException ();
-               }
-#endif         
-               
-               bool IPostBackDataHandler.LoadPostData(string postDataKey, NameValueCollection postCollection) {
                        int     index;
 
                        index = Items.IndexOf(postCollection[postDataKey]);
@@ -205,9 +195,23 @@ namespace System.Web.UI.WebControls {
                        return false;
                }
 
-               void IPostBackDataHandler.RaisePostDataChangedEvent() {
+#if NET_2_0
+               protected virtual
+#endif
+               void RaisePostDataChangedEvent ()
+               {
                        OnSelectedIndexChanged(EventArgs.Empty);
                }
+               
+               bool IPostBackDataHandler.LoadPostData (string postDataKey, NameValueCollection postCollection)
+               {
+                       return LoadPostData (postDataKey, postCollection);
+               }
+
+               void IPostBackDataHandler.RaisePostDataChangedEvent ()
+               {
+                       RaisePostDataChangedEvent ();
+               }
                #endregion      // Interface Methods
        }
 }
index 1c1d7154578566a88791100d0f0e45f73200da84..61760bde413389eed19f694ac524e295468f0a63 100644 (file)
@@ -236,26 +236,9 @@ namespace System.Web.UI.WebControls {
 
 
 #if NET_2_0
-               [MonoTODO]
-               protected virtual bool LoadPostData (string postDataKey, NameValueCollection psotCollection) 
-               {
-                       throw new NotImplementedException ();
-               }
-
-               [MonoTODO]
-               protected virtual void RaisePostDataChangedEvent ()
-               {
-                       throw new NotImplementedException ();
-               }
-               
-               [MonoTODO]
-               protected virtual void RaisePostBackEvent (string eventArgument)
-               {
-                       throw new NotImplementedException ();
-               }
+               protected virtual
 #endif
-
-               bool IPostBackDataHandler.LoadPostData (string postDataKey,  NameValueCollection postCollection)
+               bool LoadPostData (string postDataKey, NameValueCollection postCollection) 
                {
                        string x, y;
 
@@ -270,14 +253,10 @@ namespace System.Web.UI.WebControls {
 
                        return true;
                }
-
-
-               void IPostBackDataHandler.RaisePostDataChangedEvent ()
-               {
-
-               }
-
-               void IPostBackEventHandler.RaisePostBackEvent (string eventArgument)
+#if NET_2_0
+               protected virtual
+#endif
+               void RaisePostDataChangedEvent ()
                {
                        if (CausesValidation)
 #if NET_2_0
@@ -289,6 +268,30 @@ namespace System.Web.UI.WebControls {
                        OnClick (new ImageClickEventArgs (pos_x, pos_y));
                        OnCommand (new CommandEventArgs (CommandName, CommandArgument));
                }
+               
+               [MonoTODO]
+#if NET_2_0
+               protected virtual
+#endif
+               void RaisePostBackEvent (string eventArgument)
+               {
+               }
+
+               bool IPostBackDataHandler.LoadPostData (string postDataKey, NameValueCollection postCollection)
+               {
+                       return LoadPostData (postDataKey, postCollection);
+               }
+
+
+               void IPostBackDataHandler.RaisePostDataChangedEvent ()
+               {
+                       RaisePostDataChangedEvent ();
+               }
+
+               void IPostBackEventHandler.RaisePostBackEvent (string eventArgument)
+               {
+                       RaisePostBackEvent (eventArgument);
+               }
 
                protected virtual void OnClick (ImageClickEventArgs e)
                {
index 7544e0d9d037d33c4c0acd326c039fd82c83af54..7910628267652543ad476d03b5f55acd96f50147 100644 (file)
@@ -184,21 +184,9 @@ namespace System.Web.UI.WebControls {
                }
 
 #if NET_2_0
-               [MonoTODO]
-               protected virtual bool LoadPostData (string postDataKey, NameValueCollection postCollection)
-               {
-                       throw new NotImplementedException ();
-               }
-
-               [MonoTODO]
-               protected virtual void RaisePostDataChangedEvent ()
-               {
-                       throw new NotImplementedException ();
-               }
-#endif         
-                       
-               bool IPostBackDataHandler.LoadPostData (string postDataKey,
-                               NameValueCollection postCollection)
+               protected virtual
+#endif
+               bool LoadPostData (string postDataKey, NameValueCollection postCollection)
                {
                        string [] items = postCollection.GetValues (postDataKey) as string [];
                        bool res = false;
@@ -219,10 +207,24 @@ namespace System.Web.UI.WebControls {
                        return res;
                }
 
-               void IPostBackDataHandler.RaisePostDataChangedEvent ()
+#if NET_2_0
+               protected virtual
+#endif
+               void RaisePostDataChangedEvent ()
                {
                        OnSelectedIndexChanged (EventArgs.Empty);
                }
+                       
+               bool IPostBackDataHandler.LoadPostData (string postDataKey,
+                                                       NameValueCollection postCollection)
+               {
+                       return LoadPostData (postDataKey, postCollection);
+               }
+
+               void IPostBackDataHandler.RaisePostDataChangedEvent ()
+               {
+                       RaisePostDataChangedEvent ();
+               }
        }
 }
 
index c7b233852615badbb0c0d0cf346e308c128e88d1..da7c0ce32e9546085577f7aef823d68be59025ba 100644 (file)
@@ -78,20 +78,9 @@ namespace System.Web.UI.WebControls {
                }
 
 #if NET_2_0
-               [MonoTODO]
-               protected override bool LoadPostData (string postDataKey, NameValueCollection postCollection) 
-               {
-                       throw new NotImplementedException ();
-               }
-
-               [MonoTODO]
-               protected override void RaisePostDataChangedEvent ()
-               {
-                       throw new NotImplementedException ();
-               }
-#endif         
-
-               bool IPostBackDataHandler.LoadPostData (string postDataKey, NameValueCollection postCollection)
+               protected override
+#endif
+               bool LoadPostData (string postDataKey, NameValueCollection postCollection) 
                {
                        bool old_checked = Checked;
                        
@@ -107,5 +96,17 @@ namespace System.Web.UI.WebControls {
                                return (false);
                        }
                }
+
+#if NET_2_0
+               protected override
+#endif
+               void RaisePostDataChangedEvent ()
+               {
+               }
+
+               bool IPostBackDataHandler.LoadPostData (string postDataKey, NameValueCollection postCollection)
+               {
+                       return LoadPostData (postDataKey, postCollection);
+               }
        }
 }
index 27a0fb0870c275bf6415c54597b3b1b096ad067b..1dc107c35fa3a93da25bae1bc3c76851e70d3600 100644 (file)
@@ -221,60 +221,68 @@ namespace System.Web.UI.WebControls {
                {
                        throw new NotImplementedException ();
                }
+#endif
 
-               [MonoTODO]
-               protected virtual Style GetItemStyle (ListItemType itemType, int repeatIndex)
+#if NET_2_0
+               protected virtual
+#endif
+               Style GetItemStyle (ListItemType itemType, int repeatIndex)
                {
-                       throw new NotImplementedException ();
+                       return null;
                }
 
-               [MonoTODO]
-               protected virtual bool LoadPostData (string postDataKey, NameValueCollection postCollection)
+#if NET_2_0
+               protected virtual
+#endif
+               void RenderItem (ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo, HtmlTextWriter writer)
                {
-                       throw new NotImplementedException ();
+                       RadioButton radio = new RadioButton ();
+                       radio.Text = Items [repeatIndex].Text;
+                       radio.ID = ClientID + "_"  + repeatIndex;
+                       radio.TextAlign = TextAlign;
+                       radio.GroupName = UniqueID;
+                       radio.Page = Page;
+                       radio.Checked = Items [repeatIndex].Selected;
+                       radio.Attributes["Value"] = Items [repeatIndex].Value;
+                       radio.RenderControl (writer);
                }
 
                [MonoTODO]
-               protected virtual void RaisePostDataChangedEvent ()
+#if NET_2_0
+               protected virtual
+#endif
+               bool LoadPostData (string postDataKey, NameValueCollection postCollection)
                {
-                       throw new NotImplementedException ();
+                       return true;
                }
 
                [MonoTODO]
-               protected virtual void RenderItem (ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo, HtmlTextWriter writer)
+#if NET_2_0
+               protected virtual
+#endif
+               void RaisePostDataChangedEvent ()
                {
-                       throw new NotImplementedException ();
                }
-#endif         
 
-               [MonoTODO]
+
                bool IPostBackDataHandler.LoadPostData (string postDataKey, NameValueCollection postCollection)
                {
-                       return true;
+                       return LoadPostData (postDataKey, postCollection);
                }
                
-               [MonoTODO]
                void IPostBackDataHandler.RaisePostDataChangedEvent ()
                {
-
+                       RaisePostDataChangedEvent ();
                }
 
                Style IRepeatInfoUser.GetItemStyle (ListItemType itemType,  int repeatIndex)
                {
-                       return null;
+                       return GetItemStyle (itemType, repeatIndex);
                }
 
                void IRepeatInfoUser.RenderItem (ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo, HtmlTextWriter writer)
                {
-                       RadioButton radio = new RadioButton ();
-                       radio.Text = Items [repeatIndex].Text;
-                       radio.ID = ClientID + "_"  + repeatIndex;
-                       radio.TextAlign = TextAlign;
-                       radio.GroupName = UniqueID;
-                       radio.Page = Page;
-                       radio.Checked = Items [repeatIndex].Selected;
-                       radio.Attributes["Value"] = Items [repeatIndex].Value;
-                       radio.RenderControl (writer);
+                       RenderItem (itemType, repeatIndex, repeatInfo, writer);
                }
 
 #if NET_2_0
index 5b75af99793d6882e3ef603d5d9bd3382681fa5c..f91ff3b6ca198dd45c641b40136a806ea9e018d4 100644 (file)
@@ -128,32 +128,34 @@ namespace System.Web.UI.WebControls {
                }
                
 #if NET_2_0
-               [MonoTODO]
-               protected virtual bool LoadPostData (string postDataKey, NameValueCollection postCollection)
+               protected virtual
+#endif
+               bool LoadPostData (string postDataKey, NameValueCollection postCollection)
                {
-                       throw new NotImplementedException ();
+                       if (Text != postCollection [postDataKey]) {
+                               Text = postCollection [postDataKey];
+                               return true;
+                       }
+                       
+                       return false;
                }
 
-               [MonoTODO]
-               protected virtual void RaisePostDataChangedEvent ()
+#if NET_2_0
+               protected virtual
+#endif
+               void RaisePostDataChangedEvent ()
                {
-                       throw new NotImplementedException ();
+                       OnTextChanged (EventArgs.Empty);
                }
-#endif
 
-               bool IPostBackDataHandler.LoadPostData (string key, NameValueCollection col)
+               bool IPostBackDataHandler.LoadPostData (string postDataKey, NameValueCollection postCollection)
                {
-                       if (Text != col [key]) {        
-                               Text = col [key];
-                               return true;
-                       }
-                       
-                       return false;
+                       return LoadPostData (postDataKey, postCollection);
                }
        
                void IPostBackDataHandler.RaisePostDataChangedEvent ()
                {
-                       OnTextChanged (EventArgs.Empty);
+                       RaisePostDataChangedEvent ();
                }
 
 #if NET_2_0