diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2003-04-30 09:03:59 +0400 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2003-04-30 09:03:59 +0400 |
commit | a1ddbcdbe5651c21fc138183514575ea0d42de2e (patch) | |
tree | 81e3cce4540acdc1d332c3e2db8039f4d3640070 /mcs/class | |
parent | a0a0d602bc386ee772d50d4bdf12339f1533f277 (diff) |
2003-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* HtmlImage.cs:
* HtmlInputControl.cs:
* HtmlSelect.cs: added control builder attribute.
* HtmlSelectBuilder.cs: builder for HtmlSelect.
* HtmlControlBuilder.cs: common builder for all HtmlControls.
svn path=/trunk/mcs/; revision=14143
Diffstat (limited to 'mcs/class')
6 files changed, 67 insertions, 1 deletions
diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog b/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog index 541a98a6232..efb8a91af3f 100644 --- a/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog +++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog @@ -1,3 +1,13 @@ +2003-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * HtmlImage.cs: + * HtmlInputControl.cs: + * HtmlSelect.cs: added control builder attribute. + + * HtmlSelectBuilder.cs: builder for HtmlSelect. + + * HtmlControlBuilder.cs: common builder for all HtmlControls. + 2003-01-29 Gonzalo Paniagua Javier <gonzalo@ximian.com> * HtmlControl.cs: _tagName is now internal. diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlControlBuilder.cs b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlControlBuilder.cs new file mode 100644 index 00000000000..b41de8ad6f6 --- /dev/null +++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlControlBuilder.cs @@ -0,0 +1,22 @@ +// +// System.Web.UI.HtmlControls.HtmlControlBuilder +// +// Authors: +// Gonzalo Paniagua Javier (gonzalo@ximian.com) +// +// (C) 2003 Ximian, Inc (http://www.ximian.com) +// + +using System.Web.UI; + +namespace System.Web.UI.HtmlControls +{ + class HtmlControlBuilder : ControlBuilder + { + public override bool HasBody () + { + return false; + } + } +} + diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlImage.cs b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlImage.cs index 5cf3ce795d8..b08d6575d79 100755 --- a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlImage.cs +++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlImage.cs @@ -10,6 +10,7 @@ using System.Web.UI; using System.Globalization;
namespace System.Web.UI.HtmlControls{
+ [ControlBuilder (typeof (HtmlControlBuilder))]
public class HtmlImage : HtmlControl{
public HtmlImage(): base("img"){}
diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputControl.cs b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputControl.cs index ee23654859f..5e68d68f39f 100755 --- a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputControl.cs +++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputControl.cs @@ -11,7 +11,7 @@ using System.Globalization; namespace System.Web.UI.HtmlControls { - + [ControlBuilder (typeof (HtmlControlBuilder))] public abstract class HtmlInputControl : HtmlControl { diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlSelect.cs b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlSelect.cs index 9ace6eab302..1958854f3fe 100755 --- a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlSelect.cs +++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlSelect.cs @@ -14,6 +14,7 @@ using System.Collections.Specialized; namespace System.Web.UI.HtmlControls{
+ [ControlBuilder (typeof (HtmlSelectBuilder))]
[DefaultEvent("ServerChange")]
[ValidationProperty("Value")]
public class HtmlSelect : HtmlContainerControl, IPostBackDataHandler{
diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlSelectBuilder.cs b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlSelectBuilder.cs new file mode 100644 index 00000000000..d0d09a963ac --- /dev/null +++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlSelectBuilder.cs @@ -0,0 +1,32 @@ +// +// System.Web.UI.HtmlControls.HtmlSelectBuilder +// +// Authors: +// Gonzalo Paniagua Javier (gonzalo@ximian.com) +// +// (C) 2003 Ximian, Inc (http://www.ximian.com) +// + +using System.Collections; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace System.Web.UI.HtmlControls +{ + class HtmlSelectBuilder : ControlBuilder + { + public override bool AllowWhitespaceLiterals () + { + return false; + } + + public override Type GetChildControlType (string tagName, IDictionary attribs) + { + if (System.String.Compare (tagName, "option", true) != 0) + return null; + + return typeof (ListItem); + } + } +} + |