Просмотр исходного кода

2008-11-01 Marek Habersack <[email protected]>

	* ListView.cs: do not instantiate the layout template more than
	necessary.

	* NextPreviousPagerField.cs: moved some common code to the base
	class (the GetQueryModeStartRowIndex method)

	* DataPager.cs: do not call SetPageProperties more than
	necessary.

	* NumericPagerField.cs: implemented

	* DataPagerField.cs: added a helper method,
	GetQueryModeStartRowIndex, to be used by all the concrete
	implementations to calculate the starting row index in the query
	mode.

svn path=/trunk/mcs/; revision=117600
Marek Habersack 17 лет назад
Родитель
Сommit
2deb953d44

+ 18 - 0
mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ChangeLog

@@ -1,3 +1,21 @@
+2008-11-01  Marek Habersack  <[email protected]>
+
+	* ListView.cs: do not instantiate the layout template more than
+	necessary.
+
+	* NextPreviousPagerField.cs: moved some common code to the base
+	class (the GetQueryModeStartRowIndex method)
+
+	* DataPager.cs: do not call SetPageProperties more than
+	necessary.
+
+	* NumericPagerField.cs: implemented
+
+	* DataPagerField.cs: added a helper method,
+	GetQueryModeStartRowIndex, to be used by all the concrete
+	implementations to calculate the starting row index in the query
+	mode.
+
 2008-10-31  Marek Habersack  <[email protected]>
 
 	* ListView.cs: use StartRowIndex and MaximumRows properties when

+ 2 - 1
mcs/class/System.Web.Extensions/System.Web.UI.WebControls/DataPager.cs

@@ -362,7 +362,8 @@ namespace System.Web.UI.WebControls
 
 			_startRowIndex = startRowIndex;
 			_maximumRows = maximumRows;
-
+			_needSetPageProperties = false;
+			
 			_pageableContainer.SetPageProperties (startRowIndex, maximumRows, databind);
 		}
 

+ 35 - 0
mcs/class/System.Web.Extensions/System.Web.UI.WebControls/DataPagerField.cs

@@ -202,6 +202,41 @@ namespace System.Web.UI.WebControls
 			_dataPager = pager;
 		}
 
+		internal bool GetQueryModeStartRowIndex (int totalRowCount, int maximumRows, ref int startRowIndex, ref bool setPagePropertiesNeeded)
+		{
+			bool queryMode = !String.IsNullOrEmpty (DataPager.QueryStringField);
+			if (!queryMode || QueryStringHandled)
+				return false;
+
+			QueryStringHandled = true;
+
+			// We need to calculate the new start index since it is probably out
+			// of date because the GET parameter with the page number hasn't
+			// been processed yet
+			int pageNumber;
+			try {
+				pageNumber = Int32.Parse (QueryStringValue);
+			} catch {
+				// ignore
+				pageNumber = -1;
+			}
+
+			if (pageNumber >= 0) {
+				pageNumber--; // we're zero-based since we're calculating
+				// the offset/index
+				if (pageNumber >= 0) {
+					// zero-based calculation again
+					int pageCount = (totalRowCount - 1) / maximumRows; 
+					if (pageNumber <= pageCount) {
+						startRowIndex = pageNumber * maximumRows;
+						setPagePropertiesNeeded = true;
+					}
+				}
+			}
+
+			return false;
+		}
+		
 		void AddEventHandler (object key, EventHandler handler)
 		{
 			if (events == null)

+ 24 - 18
mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListView.cs

@@ -86,10 +86,9 @@ namespace System.Web.UI.WebControls
 
 		Control _layoutTemplatePlaceholder;
 		Control _nonGroupedItemsContainer;
-		int _nonGroupedItemsContainerFirstItemIndex;
+		int _nonGroupedItemsContainerFirstItemIndex = -1;
 		int _nonGroupedItemsContainerItemCount;
 		IOrderedDictionary _lastInsertValues;
-
 #region Events
 		// Event keys
 		static readonly object ItemCancellingEvent = new object ();
@@ -771,7 +770,7 @@ namespace System.Web.UI.WebControls
 					_totalRowCount = retList.Count;
 				else
 					_totalRowCount = 0;
-			
+
 				OnTotalRowCountAvailable (new PageEventArgs (_startRowIndex, _maximumRows, _totalRowCount));
 			} else
 				emptySet = true;
@@ -868,7 +867,8 @@ namespace System.Web.UI.WebControls
 		protected virtual IList <ListViewDataItem> CreateItemsWithoutGroups (ListViewPagedDataSource dataSource, bool dataBinding,
 										     InsertItemPosition insertPosition, ArrayList keyArray)
 		{
-			_nonGroupedItemsContainer = FindPlaceholder (ItemPlaceholderID, _layoutTemplatePlaceholder);
+			if (_nonGroupedItemsContainer == null)
+				_nonGroupedItemsContainer = FindPlaceholder (ItemPlaceholderID, this);
 			_nonGroupedItemsContainerItemCount = 0;
 			
 			if (_nonGroupedItemsContainer == null)
@@ -876,16 +876,20 @@ namespace System.Web.UI.WebControls
 					String.Format ("An item placeholder must be specified on ListView '{0}'. Specify an item placeholder by setting a control's ID property to \"itemPlaceholder\". The item placeholder control must also specify runat=\"server\".", ID));
 
 			Control parent = _nonGroupedItemsContainer.Parent;
-			int ipos = 0;
-			
-			if (parent != null) {
-				ipos = parent.Controls.IndexOf (_nonGroupedItemsContainer);
-				parent.Controls.Remove (_nonGroupedItemsContainer);
-				_nonGroupedItemsContainer = parent;
-				if (_nonGroupedItemsContainer != _layoutTemplatePlaceholder)
-					AddControlToContainer (_nonGroupedItemsContainer, _layoutTemplatePlaceholder, 0);
-			}
-			_nonGroupedItemsContainerFirstItemIndex = ipos;
+
+			int ipos;
+			if (_nonGroupedItemsContainerFirstItemIndex == -1) {
+				ipos = 0;
+				if (parent != null) {
+					ipos = parent.Controls.IndexOf (_nonGroupedItemsContainer);
+					parent.Controls.Remove (_nonGroupedItemsContainer);
+					_nonGroupedItemsContainer = parent;
+					if (_nonGroupedItemsContainer != _layoutTemplatePlaceholder)
+						AddControlToContainer (_nonGroupedItemsContainer, _layoutTemplatePlaceholder, 0);
+				}
+				_nonGroupedItemsContainerFirstItemIndex = ipos;
+			} else
+				ipos = _nonGroupedItemsContainerFirstItemIndex;
 			
 			List <ListViewDataItem> ret = new List <ListViewDataItem> ();
 			ListViewItem lvi;
@@ -970,7 +974,7 @@ namespace System.Web.UI.WebControls
 			if (_layoutTemplate != null) {
 				_layoutTemplatePlaceholder = new Control ();
 				_layoutTemplate.InstantiateIn (_layoutTemplatePlaceholder);
-				AddControlToContainer (_layoutTemplatePlaceholder, this, 0);
+				Controls.Add (_layoutTemplatePlaceholder);
 			}
 			
 			OnLayoutCreated (EventArgs.Empty);
@@ -982,7 +986,9 @@ namespace System.Web.UI.WebControls
 	
 		protected virtual void EnsureLayoutTemplate ()
 		{
-			Controls.Clear ();
+			if (Controls.Count != 0)
+				return;
+			
 			CreateLayoutTemplate ();
 		}
 	
@@ -994,7 +1000,7 @@ namespace System.Web.UI.WebControls
 			if (!(item is ListViewDataItem))
 				throw new InvalidOperationException ("item is not a ListViewDataItem object.");
 		}
-	
+
 		protected virtual Control FindPlaceholder (string containerID, Control container)
 		{
 			if (container == null || String.IsNullOrEmpty (containerID))
@@ -1404,7 +1410,7 @@ namespace System.Web.UI.WebControls
 					var args = new PagePropertiesChangingEventArgs (maximumRows, startRowIndex);
 					OnPagePropertiesChanging (args);
 				}
-				
+
 				_startRowIndex = startRowIndex;
 				_maximumRows = maximumRows;
 

+ 4 - 33
mcs/class/System.Web.Extensions/System.Web.UI.WebControls/NextPreviousPagerField.cs

@@ -4,7 +4,7 @@
 // Authors:
 //   Marek Habersack ([email protected])
 //
-// (C) 2007 Novell, Inc
+// (C) 2007-2008 Novell, Inc
 //
 
 //
@@ -80,36 +80,8 @@ namespace System.Web.UI.WebControls
 			_totalRowCount = totalRowCount;
 			_fieldIndex = fieldIndex;
 
-			bool queryMode = !String.IsNullOrEmpty (DataPager.QueryStringField);
 			bool setPagePropertiesNeeded = false;
-
-			if (queryMode && !QueryStringHandled) {
-				QueryStringHandled = true;
-
-				// We need to calculate the new start index since it is probably out
-				// of date because the GET parameter with the page number hasn't
-				// been processed yet
-				int pageNumber = -1;
-				try {
-					pageNumber = Int32.Parse (QueryStringValue);
-				} catch {
-					// ignore
-				}
-
-				if (pageNumber >= 0) {
-					pageNumber--; // we're zero-based since we're calculating
-						      // the offset/index
-					if (pageNumber >= 0) {
-						// zero-based calculation again
-						int pageCount = (_totalRowCount - 1) / _maximumRows; 
-						if (pageNumber <= pageCount) {
-							_startRowIndex = pageNumber * _maximumRows;
-							setPagePropertiesNeeded = true;
-						}
-					}
-				}
-			}
-			
+			bool queryMode = GetQueryModeStartRowIndex (_totalRowCount, _maximumRows, ref _startRowIndex, ref setPagePropertiesNeeded);
 			bool enablePrevFirst = _startRowIndex >= _maximumRows;
 			bool enableNextLast = (_startRowIndex + _maximumRows) < _totalRowCount;
 			bool addNonBreakingSpace = RenderNonBreakingSpacesBetweenControls;
@@ -150,8 +122,8 @@ namespace System.Web.UI.WebControls
 				DataPager.SetPageProperties (_startRowIndex, _maximumRows, true);
 		}
 
-		void CreateButton (DataPagerFieldItem container, string commandName, string text, string imageUrl, int pageNum, bool queryMode,
-				   bool enabled, bool addNonBreakingSpace)
+		void CreateButton (DataPagerFieldItem container, string commandName, string text, string imageUrl, int pageNum,
+				   bool queryMode, bool enabled, bool addNonBreakingSpace)
 		{
 			WebControl ctl = null;
 			
@@ -163,7 +135,6 @@ namespace System.Web.UI.WebControls
 				h.Enabled = enabled;
 				h.NavigateUrl = GetQueryStringNavigateUrl (pageNum);
 				h.CssClass = ButtonCssClass;
-
 				ctl = h;
 			} else {
 				if (!enabled && RenderDisabledButtonsAsLabels) {

+ 286 - 20
mcs/class/System.Web.Extensions/System.Web.UI.WebControls/NumericPagerField.cs

@@ -4,7 +4,7 @@
 // Authors:
 //   Marek Habersack ([email protected])
 //
-// (C) 2007 Novell, Inc
+// (C) 2007-2008 Novell, Inc
 //
 
 //
@@ -29,6 +29,7 @@
 //
 #if NET_3_5
 using System;
+using System.Globalization;
 using System.Security.Permissions;
 using System.Web;
 using System.Web.UI;
@@ -39,19 +40,149 @@ namespace System.Web.UI.WebControls
 	[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
 	public class NumericPagerField : DataPagerField
 	{
+		const string Default_NextPageText = "...";
+		const string Default_PreviousPageText = "...";
+
+		int _startRowIndex;
+		int _maximumRows;
+		int _totalRowCount;
+		int _fieldIndex;
+		bool _renderNonBreakingSpacesBetweenControls = true;
+		
 		public NumericPagerField ()
 		{
 		}
 
 		protected override void CopyProperties (DataPagerField newField)
 		{
+			base.CopyProperties (newField);
+
+			NumericPagerField field = newField as NumericPagerField;
+			if (field != null) {
+				field.ButtonCount = ButtonCount;
+				field.ButtonType = ButtonType;
+				field.CurrentPageLabelCssClass = CurrentPageLabelCssClass;
+				field.NextPageImageUrl = NextPageImageUrl;
+				field.NextPageText = NextPageText;
+				field.NextPreviousButtonCssClass = NextPreviousButtonCssClass;
+				field.NumericButtonCssClass = NumericButtonCssClass;
+				field.PreviousPageImageUrl = PreviousPageImageUrl;
+				field.PreviousPageText = PreviousPageText;
+				field.RenderNonBreakingSpacesBetweenControls = RenderNonBreakingSpacesBetweenControls;
+			}
 		}
 
-		public override void CreateDataPagers (DataPagerFieldItem container, int startRowIndex, int maximumRows,
-						       int totalRowCount, int fieldIndex)
+		public override void CreateDataPagers (DataPagerFieldItem container, int startRowIndex, int maximumRows, int totalRowCount, int fieldIndex)
 		{
+			_startRowIndex = startRowIndex;
+			_maximumRows = maximumRows;
+			_totalRowCount = totalRowCount;
+			_fieldIndex = fieldIndex;
+
+			bool setPagePropertiesNeeded = false;
+			bool queryMode = GetQueryModeStartRowIndex (_totalRowCount, _maximumRows, ref _startRowIndex, ref setPagePropertiesNeeded);
+			bool addNonBreakingSpace = RenderNonBreakingSpacesBetweenControls;
+			int buttonCount = ButtonCount;
+
+			int totalPages = totalRowCount / maximumRows + (totalRowCount % maximumRows > 0 ? 1 : 0);
+			int currentPage = startRowIndex == 0 ? 1 : (startRowIndex / maximumRows) + 1;
+			int firstPage = ((startRowIndex / (maximumRows * buttonCount)) * buttonCount) + 1;
+			int lastPage = firstPage + buttonCount - 1;
+			
+			bool showPreviousPage = firstPage > buttonCount;
+			bool showNextPage = totalPages - firstPage >= buttonCount;
+
+			if (lastPage > totalPages)
+				lastPage = totalPages;
+
+			int newPageNum = -1;
+			if (showPreviousPage) {
+				if (queryMode)
+					newPageNum = (_startRowIndex / _maximumRows) - 1;
+				
+				CreateButton (container, DataControlCommands.PreviousPageCommandArgument, PreviousPageText, PreviousPageImageUrl,
+					      NextPreviousButtonCssClass, newPageNum, queryMode, true, addNonBreakingSpace);
+			}
+
+			string numericButtonCssClass = NumericButtonCssClass;
+			bool enabled;
+			string pageString;
+			while (firstPage <= lastPage) {
+				enabled = firstPage != currentPage;
+				pageString = firstPage.ToString (CultureInfo.InvariantCulture);
+				CreateButton (container, pageString, pageString, String.Empty,
+					      enabled ? numericButtonCssClass : CurrentPageLabelCssClass, firstPage,
+					      queryMode, enabled, addNonBreakingSpace);
+				firstPage++;
+			}
+			
+			if (showNextPage) {
+				if (queryMode)
+					newPageNum = (_startRowIndex + _maximumRows) / _maximumRows;
+				
+				CreateButton (container, DataControlCommands.NextPageCommandArgument, NextPageText, NextPageImageUrl,
+					      NextPreviousButtonCssClass, newPageNum, queryMode, true, addNonBreakingSpace);
+			}
+
+			if (setPagePropertiesNeeded)
+				DataPager.SetPageProperties (_startRowIndex, _maximumRows, true);
 		}
 
+		void CreateButton (DataPagerFieldItem container, string commandName, string text, string imageUrl, string cssClass, int pageNum,
+				   bool queryMode, bool enabled, bool addNonBreakingSpace)
+		{
+			WebControl ctl = null;
+			
+			if (queryMode) {
+				pageNum++;
+				HyperLink h = new HyperLink ();
+				h.Text = text;
+				h.ImageUrl = imageUrl;
+				h.Enabled = enabled;
+				h.NavigateUrl = GetQueryStringNavigateUrl (pageNum);
+				h.CssClass = cssClass;
+				ctl = h;
+			} else {
+				if (!enabled) {
+					Label l = new Label ();
+					l.Text = text;
+					l.CssClass = cssClass;
+					ctl = l;
+				} else {
+					switch (ButtonType) {
+						case ButtonType.Button:
+							Button btn = new Button ();
+							btn.CommandName = commandName;
+							btn.Text = text;
+							break;
+
+						case ButtonType.Link:
+							LinkButton lbtn = new LinkButton ();
+							lbtn.CommandName = commandName;
+							lbtn.Text = text;
+							ctl = lbtn;
+							break;
+
+						case ButtonType.Image:
+							ImageButton ibtn = new ImageButton ();
+							ibtn.CommandName = commandName;
+							ibtn.ImageUrl = imageUrl;
+							ibtn.AlternateText = text;
+							ctl = ibtn;
+							break;
+					}
+
+					if (ctl != null)
+						ctl.CssClass = cssClass;
+				}
+			}
+
+			if (ctl != null) {
+				container.Controls.Add (ctl);
+				if (addNonBreakingSpace)
+					container.Controls.Add (new LiteralControl ("&nbsp;"));
+			}
+		}
 		protected override DataPagerField CreateField ()
 		{
 			return new NumericPagerField ();
@@ -59,106 +190,241 @@ namespace System.Web.UI.WebControls
 
 		public override bool Equals (object o)
 		{
-			throw new NotImplementedException ();
+			NumericPagerField field = o as NumericPagerField;
+
+			if (field == null)
+				return false;
+
+			if (field.ButtonCount != ButtonCount)
+				return false;
+			
+			if (field.ButtonType != ButtonType)
+				return false;
+			
+			if (String.Compare (field.CurrentPageLabelCssClass, CurrentPageLabelCssClass, StringComparison.Ordinal) != 0)
+				return false;
+			
+			if (String.Compare (field.NextPageImageUrl, NextPageImageUrl, StringComparison.Ordinal) != 0)
+				return false;
+			
+			if (String.Compare (field.NextPageText, NextPageText, StringComparison.Ordinal) != 0)
+				return false;
+			
+			if (String.Compare (field.NextPreviousButtonCssClass, NextPreviousButtonCssClass, StringComparison.Ordinal) != 0)
+				return false;
+			
+			if (String.Compare (field.NumericButtonCssClass, NumericButtonCssClass, StringComparison.Ordinal) != 0)
+				return false;
+			
+			if (String.Compare (field.PreviousPageImageUrl, PreviousPageImageUrl, StringComparison.Ordinal) != 0)
+				return false;
+			
+			if (String.Compare (field.PreviousPageText, PreviousPageText, StringComparison.Ordinal) != 0)
+				return false;
+			
+			if (field.RenderNonBreakingSpacesBetweenControls != RenderNonBreakingSpacesBetweenControls)
+				return false;
+
+			return true;
 		}
 
 		public override int GetHashCode ()
 		{
-			throw new NotImplementedException ();
+			int ret = 0;
+
+			// Base the calculation on the properties that are copied in CopyProperties
+			ret |= ButtonCount.GetHashCode ();
+			ret |= ButtonType.GetHashCode ();
+			ret |= CurrentPageLabelCssClass.GetHashCode ();
+			ret |= NextPageImageUrl.GetHashCode ();
+			ret |= NextPageText.GetHashCode ();
+			ret |= NextPreviousButtonCssClass.GetHashCode ();
+			ret |= NumericButtonCssClass.GetHashCode ();
+			ret |= PreviousPageImageUrl.GetHashCode ();
+			ret |= PreviousPageText.GetHashCode ();
+			ret |= RenderNonBreakingSpacesBetweenControls.GetHashCode ();
+
+			return ret;
 		}
 
 		public override void HandleEvent (CommandEventArgs e)
 		{
+			string commandName = e.CommandName;
+			int newStartIndex = -1;
+			int pageSize = DataPager.PageSize;
+
+			if (String.Compare (commandName, DataControlCommands.NextPageCommandArgument, StringComparison.OrdinalIgnoreCase) == 0) {
+				newStartIndex = _startRowIndex + pageSize;
+				if (newStartIndex > _totalRowCount)
+					newStartIndex = _totalRowCount - pageSize;
+			} else if (String.Compare (commandName, DataControlCommands.PreviousPageCommandArgument, StringComparison.OrdinalIgnoreCase) == 0) {
+				newStartIndex = _startRowIndex - pageSize;
+				if (newStartIndex < 0)
+					newStartIndex = 0;
+			} else {
+				newStartIndex = (Int32.Parse (commandName) - 1) * pageSize;
+			}
+
+			if (newStartIndex != -1)
+				DataPager.SetPageProperties (newStartIndex, pageSize, true);
 		}
 
 		public int ButtonCount {
 			get {
-				throw new NotImplementedException ();
+				object o = ViewState ["ButtonCount"];
+				if (o != null)
+					return (int)o;
+				
+				return 5;
 			}
 			
 			set {
+				if (value < 1)
+					throw new ArgumentOutOfRangeException ("value", "The ButtonCount property is set to a value less than 1.");
+				
+				ViewState ["ButtonCount"] = value;
 			}
 		}
 
 		public ButtonType ButtonType {
 			get {
-				throw new NotImplementedException ();
+				object o = ViewState ["ButtonType"];
+				if (o != null)
+					return (ButtonType)o;
+
+				return ButtonType.Link;
 			}
 			
 			set {
+				if (!Enum.IsDefined (typeof (ButtonType), value))
+					throw new ArgumentOutOfRangeException ("value", "The value for the ButtonType property is not one of the ButtonType values.");
+
+				ViewState ["ButtonType"] = value;
 			}
 		}
 
 		public string CurrentPageLabelCssClass {
 			get {
-				throw new NotImplementedException ();
+				string s = ViewState ["CurrentPageLabelCssClass"] as string;
+				if (s != null)
+					return s;
+
+				return String.Empty;
 			}
 			
 			set {
+				if (String.IsNullOrEmpty (value))
+					return;
+
+				ViewState ["CurrentPageLabelCssClass"] = value;
 			}
 		}
 
 		public string NextPageImageUrl {
 			get {
-				throw new NotImplementedException ();
+				string s = ViewState ["NextPageImageUrl"] as string;
+				if (s != null)
+					return s;
+
+				return String.Empty;
 			}
 			
 			set {
+				if (String.IsNullOrEmpty (value))
+					return;
+
+				ViewState ["NextPageImageUrl"] = value;
 			}
 		}
 
 		public string NextPageText {
 			get {
-				throw new NotImplementedException ();
+				string s = ViewState ["NextPageText"] as string;
+				if (s != null)
+					return s;
+
+				return Default_NextPageText;
 			}
 			
 			set {
+				if (String.IsNullOrEmpty (value) || String.Compare (Default_NextPageText, value, StringComparison.Ordinal) == 0)
+					return;
+
+				ViewState ["NextPageText"] = value;
 			}
 		}
 
 		public string NextPreviousButtonCssClass {
 			get {
-				throw new NotImplementedException ();
+				string s = ViewState ["NextPreviousButtonCssClass"] as string;
+				if (s != null)
+					return s;
+
+				return String.Empty;
 			}
 			
 			set {
+				if (String.IsNullOrEmpty (value))
+					return;
+
+				ViewState ["NextPreviousButtonCssClass"] = value;
 			}
 		}
 
 		public string NumericButtonCssClass {
 			get {
-				throw new NotImplementedException ();
+				string s = ViewState ["NumericButtonCssClass"] as string;
+				if (s != null)
+					return s;
+
+				return String.Empty;
 			}
 			
 			set {
+				if (String.IsNullOrEmpty (value))
+					return;
+
+				ViewState ["NumericButtonCssClass"] = value;
 			}
 		}
 
 		public string PreviousPageImageUrl {
 			get {
-				throw new NotImplementedException ();
+				string s = ViewState ["PreviousPageImageUrl"] as string;
+				if (s != null)
+					return s;
+
+				return String.Empty;
 			}
 			
 			set {
+				if (String.IsNullOrEmpty (value))
+					return;
+
+				ViewState ["PreviousPageImageUrl"] = value;
 			}
 		}
 
 		public string PreviousPageText {
 			get {
-				throw new NotImplementedException ();
+				string s = ViewState ["PreviousPageText"] as string;
+				if (s != null)
+					return s;
+
+				return Default_PreviousPageText;
 			}
 			
 			set {
+				if (String.IsNullOrEmpty (value) || String.Compare (Default_PreviousPageText, value, StringComparison.Ordinal) == 0)
+					return;
+
+				ViewState ["PreviousPageText"] = value;
 			}
 		}
 
 		public bool RenderNonBreakingSpacesBetweenControls {
-			get {
-				throw new NotImplementedException ();
-			}
-			
-			set {
-			}
+			get { return _renderNonBreakingSpacesBetweenControls; }
+			set { _renderNonBreakingSpacesBetweenControls = value; }
 		}
 	}
 }