diff options
Diffstat (limited to 'mcs/class/System.Web/System.Web.UI.WebControls')
8 files changed, 85 insertions, 29 deletions
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/AdRotator.cs b/mcs/class/System.Web/System.Web.UI.WebControls/AdRotator.cs index 0777e266fc4..de46e7d14ac 100755 --- a/mcs/class/System.Web/System.Web.UI.WebControls/AdRotator.cs +++ b/mcs/class/System.Web/System.Web.UI.WebControls/AdRotator.cs @@ -217,7 +217,7 @@ namespace System.Web.UI.WebControls [Bindable(true)] [DefaultValue("")] [Editor ("System.Web.UI.Design.XmlUrlEditor, " + Consts.AssemblySystem_Design, typeof (System.Drawing.Design.UITypeEditor))] - [WebCategory("Behaviour")] + [WebCategory("Behavior")] [WebSysDescription("AdRotator_AdvertisementFile")] public string AdvertisementFile { get { return ((advertisementFile != null) ? advertisementFile : ""); } @@ -232,7 +232,7 @@ namespace System.Web.UI.WebControls [Bindable(true)] [DefaultValue("")] - [WebCategory("Behaviour")] + [WebCategory("Behavior")] [WebSysDescription("AdRotator_KeywordFilter")] public string KeywordFilter { get { @@ -251,7 +251,7 @@ namespace System.Web.UI.WebControls [Bindable(true)] [DefaultValue("")] [TypeConverter(typeof(TargetConverter))] - [WebCategory("Behaviour")] + [WebCategory("Behavior")] [WebSysDescription("AdRotator_Target")] public string Target { get { diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/BaseCompareValidator.cs b/mcs/class/System.Web/System.Web.UI.WebControls/BaseCompareValidator.cs index 86de6a314f5..83ac1c850cc 100755 --- a/mcs/class/System.Web/System.Web.UI.WebControls/BaseCompareValidator.cs +++ b/mcs/class/System.Web/System.Web.UI.WebControls/BaseCompareValidator.cs @@ -56,7 +56,7 @@ namespace System.Web.UI.WebControls } [DefaultValue(ValidationDataType.String)] - [WebCategory("Behaviour")] + [WebCategory("Behavior")] [WebSysDescription("RangeValidator_Type")] public ValidationDataType Type { diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/BaseValidator.cs b/mcs/class/System.Web/System.Web.UI.WebControls/BaseValidator.cs index 26a081dc3e0..b003e315524 100755 --- a/mcs/class/System.Web/System.Web.UI.WebControls/BaseValidator.cs +++ b/mcs/class/System.Web/System.Web.UI.WebControls/BaseValidator.cs @@ -192,7 +192,9 @@ namespace System.Web.UI.WebControls if(!Visible || (Visible && !Enabled)) { IsValid = true; + return; } + Control ctrl = Parent; while(ctrl != null) { diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog b/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog index cb282d6377a..632b24ace91 100644 --- a/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog +++ b/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog @@ -1,6 +1,36 @@ +2004-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * TableStyle.cs: don't render empty 'rules' attribute (again). + +2004-09-12 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * RadioButton.cs: fix GroupName when the control is inside a + NamingContainer different from Page. Closes bug #65586. + +2004-09-01 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * Xml.cs: fixed get_DocumentContent (it was returning "" always!) and + don't call MapPathSecure on the content itself. + + * XmlBuilder.cs: handle XML documents written inside asp:xml. The + document is checked at parse time and will be checked again at run time. + + Fixes bug #63828. + +2004-08-10 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * Xml.cs: use MapPath in DocumentSource and documentContent. Fixes + bug #62726. + +2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * BaseValidator.cs: in Validate(), when the control is not visible or + enabled, return inmediately after setting IsValid to true. Fixes bug + #61831. + 2004-06-10 Alon Gazit <along@mainsoft.com> - * WebControl.cs: fixed LoadViewState(). - Creates new attributes state bag only when the current is null. + * WebControl.cs: fixed LoadViewState(). + Creates new attributes state bag only when the current is null. 2004-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com> diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/RadioButton.cs b/mcs/class/System.Web/System.Web.UI.WebControls/RadioButton.cs index 27bfa2c99a3..becb19787bc 100644 --- a/mcs/class/System.Web/System.Web.UI.WebControls/RadioButton.cs +++ b/mcs/class/System.Web/System.Web.UI.WebControls/RadioButton.cs @@ -99,19 +99,23 @@ namespace System.Web.UI.WebControls writer.RenderBeginTag (System.Web.UI.HtmlTextWriterTag.Input);
writer.RenderEndTag ();
}
-
- private string UniqueGroupNamePrivate
- {
- get {
- string retVal = GroupName;
- int unique = UniqueID.LastIndexOf (':');
- if (unique >= 0)
- retVal += UniqueID.Substring (unique + 1);
-
- return retVal;
- }
- }
-
+ + private string UniqueGroupNamePrivate + { + get { + string retVal; + string uid = UniqueID; + int unique = uid.LastIndexOf (':'); + if (unique == -1) { + retVal = GroupName; + } else { + retVal = uid.Substring (0, unique + 1) + GroupName; + } + + return retVal; + } + } + private string ValueAttributePrivate
{
get {
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/TableStyle.cs b/mcs/class/System.Web/System.Web.UI.WebControls/TableStyle.cs index 413b8a0745c..a1653a11928 100644 --- a/mcs/class/System.Web/System.Web.UI.WebControls/TableStyle.cs +++ b/mcs/class/System.Web/System.Web.UI.WebControls/TableStyle.cs @@ -171,7 +171,7 @@ namespace System.Web.UI.WebControls {
writer.AddAttribute(HtmlTextWriterAttribute.Align, Enum.Format(typeof(HorizontalAlign), HorizontalAlign, "G"));
}
- string gd = String.Empty; + string gd = null; switch(GridLines)
{
case GridLines.None: break; @@ -182,6 +182,8 @@ namespace System.Web.UI.WebControls case GridLines.Both: gd = "all";
break;
} + + if (gd != null) writer.AddAttribute(HtmlTextWriterAttribute.Rules, gd); } diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/Xml.cs b/mcs/class/System.Web/System.Web.UI.WebControls/Xml.cs index 7cdb7e4fea8..e2bca533f8f 100644 --- a/mcs/class/System.Web/System.Web.UI.WebControls/Xml.cs +++ b/mcs/class/System.Web/System.Web.UI.WebControls/Xml.cs @@ -116,7 +116,7 @@ namespace System.Web.UI.WebControls [WebSysDescription ("The XML content that is transformed for the XML Webcontrol.")] public string DocumentContent { get { - return String.Empty; + return documentContent; } set { document = null; @@ -189,7 +189,6 @@ namespace System.Web.UI.WebControls GetType().Name)); } - [MonoTODO("security")] private void LoadXpathDoc () { if (documentContent != null && documentContent.Length > 0) { @@ -198,12 +197,11 @@ namespace System.Web.UI.WebControls } if (documentSource != null && documentSource.Length != 0) { - xpathDoc = new XPathDocument (documentSource); + xpathDoc = new XPathDocument (MapPathSecure (documentSource)); return; } } - [MonoTODO("security")] private void LoadTransform () { if (transform != null) diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/XmlBuilder.cs b/mcs/class/System.Web/System.Web.UI.WebControls/XmlBuilder.cs index 4aaa88a7580..445e87143d2 100644 --- a/mcs/class/System.Web/System.Web.UI.WebControls/XmlBuilder.cs +++ b/mcs/class/System.Web/System.Web.UI.WebControls/XmlBuilder.cs @@ -2,8 +2,10 @@ // System.Web.UI.WebControls.XmlBuilder.cs // // Author: -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) +// Andreas Nahr (ClassDevelopment@A-SoftTech.com) +// Gonzalo Paniagua Javier (gonzalo@novell.com) // +// Copyright (c) 2004 Novell, Inc. (http://www.novell.com) // // @@ -29,14 +31,16 @@ using System; using System.Collections; +using System.Web.Compilation; using System.Web.UI; +using System.Xml; namespace System.Web.UI.WebControls { - internal class XmlBuilder : ControlBuilder + class XmlBuilder : ControlBuilder { public override void AppendLiteralString (string s) - { + { } public override Type GetChildControlType (string tagName, IDictionary attribs) @@ -49,10 +53,26 @@ namespace System.Web.UI.WebControls return true; } - [MonoTODO ("find out what this does and implement")] public override void SetTagInnerText (string text) { - throw new NotImplementedException (); + string trimmed = text.Trim (); + if (trimmed == "") + return; + + XmlDocument doc = new XmlDocument (); + try { + doc.LoadXml (text); + } catch (XmlException xmle) { + Location newloc = new Location (location); + if (xmle.LineNumber >= 0) + newloc.BeginLine += xmle.LineNumber - 1; + + location = newloc; + throw; + } + + base.AppendLiteralString (trimmed); } } } + |