You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by hu...@apache.org on 2005/06/23 18:09:03 UTC

svn commit: r193176 - in /struts/sandbox/trunk/overdrive/Nexus: Core/Helpers/IViewHelper.cs Core/Helpers/ViewHelper.cs Web/WebViewHelper.cs

Author: husted
Date: Thu Jun 23 09:09:02 2005
New Revision: 193176

URL: http://svn.apache.org/viewcvs?rev=193176&view=rev
Log:
OVR-10
* Replace Criteria with Context in Helper API, since that's what the presentation layer is suppose to  use.

Modified:
    struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/IViewHelper.cs
    struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/ViewHelper.cs
    struts/sandbox/trunk/overdrive/Nexus/Web/WebViewHelper.cs

Modified: struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/IViewHelper.cs
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/IViewHelper.cs?rev=193176&r1=193175&r2=193176&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/IViewHelper.cs (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/IViewHelper.cs Thu Jun 23 09:09:02 2005
@@ -90,7 +90,7 @@
 		/// Store input and output values.
 		/// </summary>
 		/// 
-		IRequestContext Context { get; }
+		IDictionary Criteria { get; }
 
 
 		/// <summary>

Modified: struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/ViewHelper.cs
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/ViewHelper.cs?rev=193176&r1=193175&r2=193176&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/ViewHelper.cs (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/ViewHelper.cs Thu Jun 23 09:09:02 2005
@@ -72,34 +72,24 @@
 
 		#region Read and Bind 
 
-		private IRequestContext _Context;
-		/// <remarks>
-		/// The Context is obtained through reference to the Catalog and Command.
-		/// All other properties and methods of the Helper refer to the Context, 
-		/// making Context the cornerstone property.
-		/// </remarks>
-		/// 
-		public IRequestContext Context
+		public IDictionary Criteria
 		{
 			get
 			{
-				if (_Context == null)
-					_Context = Catalog.GetRequest (Command);
-				return _Context;
+				return Context.Criteria;
 			}
 		}
 
-
 		public IList Outcome
 		{
 			get
 			{
 				IList result = null;
-				object o = Context.Criteria[Context.Command];
+				object o = Criteria[Context.Command];
 				if (o == null)
 				{
 					result = new ArrayList (1);
-					result.Add (Context.Criteria);
+					result.Add (Criteria);
 				}
 				else
 				{
@@ -234,6 +224,26 @@
 		{
 			get { return _Command; }
 			set { _Command = value; }
+		}
+
+		private IRequestContext _Context;
+		/// <summary>
+		/// Provide the all-important Context for this Helper.
+		/// </summary>
+		/// <remarks>
+		/// The Context is obtained through reference to the Catalog and Command.
+		/// All other properties and methods of the Helper refer to the Context, 
+		/// making Context the cornerstone property.
+		/// </remarks>
+		/// 
+		public IRequestContext Context
+		{
+			get
+			{
+				if (_Context == null)
+					_Context = Catalog.GetRequest (Command);
+				return _Context;
+			}
 		}
 
 		#endregion 

Modified: struts/sandbox/trunk/overdrive/Nexus/Web/WebViewHelper.cs
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Web/WebViewHelper.cs?rev=193176&r1=193175&r2=193176&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Web/WebViewHelper.cs (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Web/WebViewHelper.cs Thu Jun 23 09:09:02 2005
@@ -46,13 +46,13 @@
 		public override void Bind (ICollection controls)
 		{
 			ControlCollection cc = controls as ControlCollection;
-			BindControls (cc, Context.Criteria, Prefix, ListSuffix);
+			BindControls (cc, Criteria, Prefix, ListSuffix);
 		}
 
 		public override void Read (ICollection controls)
 		{
 			ControlCollection cc = controls as ControlCollection;
-			ReadControls (cc, Context.Criteria, Prefix, ListSuffix, NullIfEmpty);
+			ReadControls (cc, Criteria, Prefix, ListSuffix, NullIfEmpty);
 		}
 
 		public override string ErrorsText



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org