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/07/15 15:12:14 UTC

svn commit: r219197 - in /struts/sandbox/trunk/overdrive/PhoneBook: Core/Core.csproj Test/Test.csproj Web/Forms/Directory.aspx.cs Web/Forms/Directory2.aspx.cs Web/Resources/Command/AppConfig.xml Web/Web.csproj

Author: husted
Date: Fri Jul 15 06:12:12 2005
New Revision: 219197

URL: http://svn.apache.org/viewcvs?rev=219197&view=rev
Log:
OVR-5
* Add ClearContext command to post-op chain, but it does not fix the problem with having to click twice to change filters. 
* The problem is that the list is being refreshed, in case we are switching to editing mode. The critiera for the prior filter is sticking the context (somewhere), and is being merged into the new critieria set. This is not a problem when we use the same filter, since the old value overwrite the new, only when we are switching filters.

Modified:
    struts/sandbox/trunk/overdrive/PhoneBook/Core/Core.csproj
    struts/sandbox/trunk/overdrive/PhoneBook/Test/Test.csproj
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx.cs
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory2.aspx.cs
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Command/AppConfig.xml
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Web.csproj

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Core/Core.csproj
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Core/Core.csproj?rev=219197&r1=219196&r2=219197&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Core/Core.csproj (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Core/Core.csproj Fri Jul 15 06:12:12 2005
@@ -34,7 +34,7 @@
                     FileAlignment = "4096"
                     IncrementalBuild = "false"
                     NoStdLib = "false"
-                    NoWarn = ""
+                    NoWarn = "1591"
                     Optimize = "false"
                     OutputPath = "bin\Debug\"
                     RegisterForComInterop = "false"

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Test/Test.csproj
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Test/Test.csproj?rev=219197&r1=219196&r2=219197&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Test/Test.csproj (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Test/Test.csproj Fri Jul 15 06:12:12 2005
@@ -34,7 +34,7 @@
                     FileAlignment = "4096"
                     IncrementalBuild = "false"
                     NoStdLib = "false"
-                    NoWarn = ""
+                    NoWarn = "1591"
                     Optimize = "false"
                     OutputPath = "bin\Debug\"
                     RegisterForComInterop = "false"

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx.cs
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx.cs?rev=219197&r1=219196&r2=219197&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx.cs (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx.cs Fri Jul 15 06:12:12 2005
@@ -24,7 +24,7 @@
 		protected Label lblError;
 
 		/// <summary>
-		/// Display a list of error mesasges.
+		/// Display a list of error messages.
 		/// </summary>
 		public IViewHelper Page_Error
 		{

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory2.aspx.cs
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory2.aspx.cs?rev=219197&r1=219196&r2=219197&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory2.aspx.cs (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory2.aspx.cs Fri Jul 15 06:12:12 2005
@@ -153,8 +153,16 @@
 			}
 		}
 
+		private string GetRootID(string id)
+		{
+			int v = id.LastIndexOf (GridHelper.FindHelper.ListSuffix);
+			string key = id.Substring (0, v);
+			return key;			
+		}
+
 		private void Filter_Reset (DropDownList except)
 		{
+			// Reset filter controls
 			int exceptIndex = 0;
 			if (except != null) exceptIndex = except.SelectedIndex;
 			foreach (DropDownList filter in FilterList ())
@@ -162,22 +170,21 @@
 				filter.SelectedIndex = 0;
 			}
 			if (except != null) except.SelectedIndex = exceptIndex;
-			// Update other members
-			List_ResetIndex ();
+			// Tell everyone that we are starting over
 			Page_Prompt = GetMessage(App.DIRECTORY_PROMPT);
+			List_ResetIndex ();
 		}
 
 		protected override void Find_Submit (object sender, EventArgs e)
 		{
 			// Don't call base: base.Find_Submit (); 
-			IGridViewHelper h = GridHelper;
 			DropDownList list = sender as DropDownList;
-			string id = list.ID;
-			int v = id.LastIndexOf (h.FindHelper.ListSuffix);
-			string key = id.Substring (0, v);
-			h.FindHelper.Criteria [key] = list.SelectedValue;
-			List_Criteria = h.FindHelper.Criteria;
 			Filter_Reset (list);
+			string key = GetRootID(list.ID);
+			IGridViewHelper h = GridHelper;
+			h.FindHelper.Criteria.Clear ();
+			h.FindHelper.Criteria [key] = list.SelectedValue;
+			List_Criteria = GridHelper.FindHelper.Criteria;
 			List_Load ();
 		}
 

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Command/AppConfig.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Command/AppConfig.xml?rev=219197&r1=219196&r2=219197&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Command/AppConfig.xml (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Command/AppConfig.xml Fri Jul 15 06:12:12 2005
@@ -123,13 +123,17 @@
  <!-- Request Processors -->
 	
   <object id="convert_input" type="Nexus.Core.Validators.ConvertInput">
-    <property name="ID"><value>ConvertInput</value></property>
+    <property name="ID"><value>convert_input</value></property>
   </object>
 
   <object id="format_output" type="Nexus.Core.Validators.FormatOutput">
-    <property name="ID"><value>FormatOutput</value></property>    
+    <property name="ID"><value>format_output</value></property>    
   </object>
   
+  <object id="clear_context" type="Nexus.Core.Validators.ClearContext">
+    <property name="ID"><value>clear_context</value></property>    
+  </object>
+
  <!-- pre-op -->
 
   <object id="pre-op" parent="BaseChain">
@@ -146,6 +150,7 @@
 	<property name="AddCommands">
 		<list>
 			<ref object="format_output"/>
+			<ref object="clear_context"/>
 		</list>   
     </property>           
   </object>

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Web/Web.csproj
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Web.csproj?rev=219197&r1=219196&r2=219197&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Web.csproj (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Web.csproj Fri Jul 15 06:12:12 2005
@@ -34,7 +34,7 @@
                     FileAlignment = "4096"
                     IncrementalBuild = "false"
                     NoStdLib = "false"
-                    NoWarn = ""
+                    NoWarn = "1591"
                     Optimize = "false"
                     OutputPath = "bin\"
                     RegisterForComInterop = "false"



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