struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hus...@apache.org
Subject svn commit: r330618 - in /struts/sandbox/trunk/overdrive/PhoneBook: Core/ Core/Commands/ Test/Commands/ Test/Resources/ Web/ Web/Controls/ Web/Forms/ Web/Resources/
Date Thu, 03 Nov 2005 20:03:00 GMT
Author: husted
Date: Thu Nov  3 12:02:39 2005
New Revision: 330618

URL: http://svn.apache.org/viewcvs?rev=330618&view=rev
Log:
OVR-24
* Add Letter Filter to Direcotry 2.

Added:
    struts/sandbox/trunk/overdrive/PhoneBook/Core/Commands/EntryInitial.cs
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/InitialFilter.ascx
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/InitialFilter.ascx.cs
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/InitialFilter.ascx.resx
Modified:
    struts/sandbox/trunk/overdrive/PhoneBook/Core/App.cs
    struts/sandbox/trunk/overdrive/PhoneBook/Core/Core.csproj
    struts/sandbox/trunk/overdrive/PhoneBook/Core/Messages.resx
    struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/FilterLists.cs
    struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/AppBase.xml
    struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Catalog.xml
    struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Queries.xml
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/Lister2.ascx
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/Lister2.ascx.cs
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory2.aspx
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory2.aspx.cs
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Catalog.xml
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Web.csproj

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Core/App.cs
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Core/App.cs?rev=330618&r1=330617&r2=330618&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Core/App.cs (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Core/App.cs Thu Nov  3 12:02:39 2005
@@ -106,10 +106,16 @@
 		public const string ENTRY = "entry";
 
 		/// <summary>
-		/// Token for select all command.
+		/// Token for list all command.
 		/// </summary>
 		/// 
 		public const string ENTRY_LIST = "entry_list";
+
+		/// <summary>
+		/// Token for Entry Initial command.
+		/// </summary>
+		/// 
+		public const string ENTRY_INITIAL = "entry_initial";
 
 		/// <summary>
 		/// Token for List Last Names command.

Added: struts/sandbox/trunk/overdrive/PhoneBook/Core/Commands/EntryInitial.cs
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Core/Commands/EntryInitial.cs?rev=330618&view=auto
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Core/Commands/EntryInitial.cs (added)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Core/Commands/EntryInitial.cs Thu Nov  3 12:02:39
2005
@@ -0,0 +1,47 @@
+using System.Collections;
+using Nexus.Core;
+using PhoneBook.Core.Commands;
+
+namespace PhoneBook.Core.Commands
+{
+	/// <summary>
+	/// Create list of initial letters for Facility Names.
+	/// </summary>
+	public class EntryInitial : BaseMapper
+	{
+
+		/// <summary>
+		/// Document token representing match all entries.
+		/// </summary>
+		public const string ALL = "[*]";
+
+		/// <summary>
+		/// Document the wildcard character used by SQL queries.
+		/// </summary>
+		public const string WILDCARD = "%";
+
+		public override bool RequestExecute(IRequestContext context)
+		{
+			const string ZERO = "0";
+			
+			string[] input = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J",
+								 "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
+								 "U", "V", "W", "X", "Y", "Z"};
+
+			IList output = new ArrayList(26);
+
+			foreach (string letter in input)
+			{
+				string initial = letter + WILDCARD;
+				object result = Mapper.QueryForObject(QueryID, initial);
+				if (ZERO.Equals(result)) continue;
+				output.Add(letter);
+			}
+		
+			output.Add(ALL);
+			context.Outcome = output;
+			return CONTINUE;
+		}
+	}
+}
+

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Core/Core.csproj
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Core/Core.csproj?rev=330618&r1=330617&r2=330618&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Core/Core.csproj (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Core/Core.csproj Thu Nov  3 12:02:39 2005
@@ -168,6 +168,11 @@
                     SubType = "Code"
                     BuildAction = "Compile"
                 />
+                <File
+                    RelPath = "Commands\EntryInitial.cs"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
             </Include>
         </Files>
     </CSHARP>

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Core/Messages.resx
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Core/Messages.resx?rev=330618&r1=330617&r2=330618&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Core/Messages.resx (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Core/Messages.resx Thu Nov  3 12:02:39 2005
@@ -122,5 +122,8 @@
 	  <value>Select a filter to display fewer entries</value>
     </data>
     
+	<data name="not_found_hint">
+		<value>No matching entries found.</value>
+	</data>
 
 </root>

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/FilterLists.cs
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/FilterLists.cs?rev=330618&r1=330617&r2=330618&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/FilterLists.cs (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/FilterLists.cs Thu Nov  3 12:02:39
2005
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+using System;
 using System.Collections;
 using Nexus.Core;
 using Nexus.Core.Helpers;
@@ -114,5 +115,36 @@
 				Assert.IsTrue(okay, "Expected short date format, not: " + key);
 			}
 		}
+
+		[Test]
+		public void Initial()
+		{
+			IViewHelper helper = catalog.GetHelperFor(App.ENTRY_LIST);
+			helper.Criteria["initial"] = "C%";
+			helper.Execute();
+			Assert.IsTrue(helper.IsNominal,helper.AlertsText);
+			IList list = helper.Outcome;
+			Assert.IsTrue(list.Count>0,"Expected one or more entries");
+			foreach (AppEntry entry in list) 
+			{
+				Assert.IsTrue("C".Equals(entry.last_name.Substring(0,1)),"Expected all to be C*");
+			}
+			int count = Convert.ToInt32(helper.Criteria["item_count"]);
+			Assert.IsTrue(count==list.Count,"Expected counts to match");
+		}
+
+		[Test]
+		public void InitialDistinct()
+		{
+			IViewHelper helper = catalog.GetHelperFor(App.ENTRY_INITIAL);
+			helper.Execute();
+			Assert.IsTrue(helper.IsNominal,helper.AlertsText);
+			IList list = helper.Outcome;
+			Assert.IsTrue(list.Count>0,"Expected one or more entries");
+			string a = list[0] as string;
+			Assert.IsNotNull(a,"Expected letter");
+			Assert.IsTrue("C".Equals(a),"Expected C");			
+		}
+
 	}
 }

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/AppBase.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/AppBase.xml?rev=330618&r1=330617&r2=330618&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/AppBase.xml (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/AppBase.xml Thu Nov  3 12:02:39
2005
@@ -31,4 +31,6 @@
 
 	<object id="BaseSave" type="PhoneBook.Core.Commands.BaseSave, PhoneBook.Core" parent="BaseMapper"/>
 
+    <object id="EntryInitial" type="PhoneBook.Core.Commands.EntryInitial, PhoneBook.Core"
parent="BaseMapper"/>
+
 </objects>

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Catalog.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Catalog.xml?rev=330618&r1=330617&r2=330618&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Catalog.xml (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Catalog.xml Thu Nov  3 12:02:39
2005
@@ -19,6 +19,7 @@
 				<value>hired</value>
 				<value>hours</value>
 				<value>editor</value>
+				<value>initial</value>
 				<value>item_offset</value>
 				<value>item_limit</value>
 			</list>
@@ -93,6 +94,16 @@
 	<property name="RelatedIDs"><list><value>hours_list</value></list></property>

   </object>
   
+	<object id="entry_initial" parent="EntryInitial">
+		<property name="ID">
+			<value>entry_initial</value>
+		</property>
+		<property name="RelatedIDs">
+			<list>
+				<value>entry_initial</value>
+			</list>		
+		</property>
+	</object>
   
 	<!-- chains -->
     

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Queries.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Queries.xml?rev=330618&r1=330617&r2=330618&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Queries.xml (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Queries.xml Thu Nov  3 12:02:39
2005
@@ -76,6 +76,9 @@
 				pk_entry AS entry_key				
 			FROM entry
 			<dynamic prepend="WHERE">			
+				<isNotNull property="initial" prepend="AND">
+					last_name LIKE #initial#
+				</isNotNull>
 				<isNotNull property="last_name" prepend="AND">
 					last_name=#last_name#
 				</isNotNull>
@@ -111,6 +114,9 @@
 		<select id="entry_count" paramClass="Hashtable" resultClass="string">
 			SELECT COUNT(*) FROM entry
 			<dynamic prepend="WHERE">			
+				<isNotNull property="initial" prepend="AND">
+					last_name LIKE #initial#
+				</isNotNull>
 				<isNotNull property="last_name" prepend="AND">
 					last_name=#last_name#
 				</isNotNull>
@@ -137,6 +143,12 @@
 				</isNotNull>
 			</dynamic>			
 		</select>
+		
+		<select id="entry_initial" paramClass="string" resultClass="string">		
+			SELECT COUNT(*) 
+			FROM entry
+			WHERE last_name LIKE #value#
+		</select>									
 		
 		<insert id="entry_insert" parameterMap="entry_save_param">
     		INSERT INTO entry (    			

Added: struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/InitialFilter.ascx
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/InitialFilter.ascx?rev=330618&view=auto
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/InitialFilter.ascx (added)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/InitialFilter.ascx Thu Nov  3 12:02:39
2005
@@ -0,0 +1,10 @@
+<%@ Control Language="c#" AutoEventWireup="false" Codebehind="InitialFilter.ascx.cs" Inherits="PhoneBook.Web.Controls.InitialFilter"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
+<asp:repeater id="letters" runat="server">
+	<itemtemplate>
+		<asp:linkbutton id="letter" runat="server" 
+			commandname="filter" 
+			commandargument='<%# DataBinder.Eval(Container, "DataItem.Letter")%>' >
+			<%# DataBinder.Eval(Container, "DataItem.Letter")%>
+		</asp:linkbutton>
+	</itemtemplate>
+</asp:repeater>

Added: struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/InitialFilter.ascx.cs
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/InitialFilter.ascx.cs?rev=330618&view=auto
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/InitialFilter.ascx.cs (added)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/InitialFilter.ascx.cs Thu Nov  3
12:02:39 2005
@@ -0,0 +1,9 @@
+using Nexus.Web.Controls;
+
+namespace PhoneBook.Web.Controls
+{
+	public class InitialFilter : LetterFilter
+	{
+
+	}
+}

Added: struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/InitialFilter.ascx.resx
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/InitialFilter.ascx.resx?rev=330618&view=auto
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/InitialFilter.ascx.resx (added)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/InitialFilter.ascx.resx Thu Nov
 3 12:02:39 2005
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<root>
+	<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+		<xsd:element name="root" msdata:IsDataSet="true">
+			<xsd:complexType>
+				<xsd:choice maxOccurs="unbounded">
+					<xsd:element name="data">
+						<xsd:complexType>
+							<xsd:sequence>
+								<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+								<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"
/>
+							</xsd:sequence>
+							<xsd:attribute name="name" type="xsd:string" />
+							<xsd:attribute name="type" type="xsd:string" />
+							<xsd:attribute name="mimetype" type="xsd:string" />
+						</xsd:complexType>
+					</xsd:element>
+					<xsd:element name="resheader">
+						<xsd:complexType>
+							<xsd:sequence>
+								<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+							</xsd:sequence>
+							<xsd:attribute name="name" type="xsd:string" use="required" />
+						</xsd:complexType>
+					</xsd:element>
+				</xsd:choice>
+			</xsd:complexType>
+		</xsd:element>
+	</xsd:schema>
+	<resheader name="ResMimeType">
+		<value>text/microsoft-resx</value>
+	</resheader>
+	<resheader name="Version">
+		<value>1.0.0.0</value>
+	</resheader>
+	<resheader name="Reader">
+		<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+	</resheader>
+	<resheader name="Writer">
+		<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+	</resheader>
+</root>

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/Lister2.ascx
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/Lister2.ascx?rev=330618&r1=330617&r2=330618&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/Lister2.ascx (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/Lister2.ascx Thu Nov  3 12:02:39
2005
@@ -1,6 +1,6 @@
 <%@ Control Language="c#" AutoEventWireup="false" Codebehind="Lister2.ascx.cs" Inherits="PhoneBook.Web.Controls.Lister2"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
 <asp:Label ID="hint" Runat="server"></asp:Label>
-<asp:DataGrid id="list" Runat="server" AutoGenerateColumns=False
+<asp:DataGrid id="list" Runat="server" AutoGenerateColumns="False"
 	PageSize="2" AllowPaging="true" PagerStyle-Mode="NumericPages">
 	<HeaderStyle CssClass="HeaderStyle" BackColor="#CCCC99"></HeaderStyle>
 	<AlternatingItemStyle CssClass="AlternatingItemStyle" BackColor="#CCCC99"></AlternatingItemStyle>

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/Lister2.ascx.cs
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/Lister2.ascx.cs?rev=330618&r1=330617&r2=330618&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/Lister2.ascx.cs (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Controls/Lister2.ascx.cs Thu Nov  3 12:02:39
2005
@@ -24,12 +24,6 @@
 		protected Button add;
 
 		/// <summary>
-		/// ID Token to indicate a Label control.
-		/// </summary>
-		/// 
-		private static string LABEL = "_label";
-
-		/// <summary>
 		/// Complete loading Grid 
 		/// after other members have initialized.
 		/// </summary>
@@ -41,13 +35,20 @@
 		}
 
 		/// <summary>
+		/// ID Token to indicate a Label control.
+		/// </summary>
+		/// 
+		private static string LABEL = "_label";
+
+		/// <summary>
 		/// Initialize our Grid instance 
 		/// by setting the columns, labels, 
 		/// and other dynamic attributes.
 		/// </summary>
 		/// 
-		private void Grid_Init()
+		private void Grid_Init(DataGrid grid)
 		{
+			Grid = grid;
 			FindCommand = App.ENTRY_FIND;
 			ListCommand = App.ENTRY_LIST;
 			SaveCommand = App.ENTRY_SAVE;
@@ -100,9 +101,9 @@
 		/// 
 		private void Page_Init()
 		{
-			Grid = list;
-			Grid_Init();
+			Grid_Init(list);
 			this.ListPageIndexChanged += new EventHandler(this_ListPageIndexChanged);
+			add.Click += new EventHandler(list_Add);
 		}
 
 		/// <summary>
@@ -113,7 +114,6 @@
 		/// 
 		private void Page_Load(object sender, EventArgs e)
 		{
-			add.Click += new EventHandler(list_Add);
 			Grid_Load();
 		}
 

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory2.aspx
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory2.aspx?rev=330618&r1=330617&r2=330618&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory2.aspx (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory2.aspx Thu Nov  3 12:02:39
2005
@@ -1,7 +1,8 @@
 <%@ Register TagPrefix="ovr" Namespace="Nexus.Web" Assembly="Nexus.Web" %>
 <%@ Page language="c#" Codebehind="Directory2.aspx.cs" AutoEventWireup="false" Inherits="PhoneBook.Web.Forms.Directory2"
%>
-<%@ Register TagPrefix="app" TagName="Finder" Src="../Controls/Finder2.ascx" %>
+<%@ Register TagPrefix="app" TagName="Filter" Src="../Controls/InitialFilter.ascx" %>
 <%@ Register TagPrefix="app" TagName="Lister" Src="../Controls/Lister2.ascx" %>
+<%@ Register TagPrefix="app" TagName="Finder" Src="../Controls/Finder2.ascx" %>
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
 <HTML>
@@ -34,6 +35,9 @@
 			<!-- FINDER -->
 			<app:Finder id="finder" Runat="server"></app:Finder>
 			
+			<!-- LETTER FILTER -->
+			<app:Filter id="letter_filter" Runat="server"></app:Filter>
+
 			<!-- LISTER -->
  			<app:Lister id="lister" runat="server"></app:Lister>
 			

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=330618&r1=330617&r2=330618&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory2.aspx.cs (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory2.aspx.cs Thu Nov  3 12:02:39
2005
@@ -9,6 +9,7 @@
 using PhoneBook.Core;
 using PhoneBook.Web.Controls;
 using Spring.Web.UI;
+using WQD.Core.Controls;
 
 namespace PhoneBook.Web.Forms
 {
@@ -161,11 +162,36 @@
 
 		#region Event handlers
 
+		/// <summary>
+		/// Filter Lister for Directory
+		/// </summary>
+		/// 
+		protected InitialFilter letter_filter;
+
+		/// <summary>
+		/// Apply letter filter to WNE Facilty List.
+		/// </summary>
+		/// <param name="sender">Event source</param>
+		/// <param name="e">Runtime arguments</param>
+		/// 
+		private void letter_filter_View_Filter(object sender, EventArgs e)
+		{
+			FindArgs a = e as FindArgs;
+			lister.Read(a.Criteria);
+			lister.Reset();
+			lister.Open();
+		}
+
+		/// <summary>
+		/// List matching directory entries.
+		/// </summary>
+		/// 
 		protected Lister2 lister;
 
 		/// <summary>
 		/// Capture input values to filter a list of directory entries.
 		/// </summary>
+		/// 
 		protected Finder2 finder;
 
 		/// <summary>
@@ -176,7 +202,7 @@
 		/// <param name="sender">Event source</param>
 		/// <param name="e">Runtime arguements</param>
 		/// 
-		protected void finder_Click(object sender, EventArgs e)
+		protected void finder_Filter_Changed(object sender, EventArgs e)
 		{
 			ViewArgs a = e as ViewArgs;
 			IViewHelper helper = a.Helper;
@@ -209,8 +235,15 @@
 			this.PreRender += new EventHandler(this.Page_PreRender);
 
 			View_Init(finder);
+
+			View_Init(letter_filter);
+			letter_filter.View_Filter += new EventHandler(letter_filter_View_Filter);
+			IViewHelper helper = Catalog.GetHelperFor(App.ENTRY_INITIAL);
+			helper.Execute();
+			letter_filter.Open(helper.Outcome);
+
 			View_Init(lister);
-			finder.Filter_Changed += new EventHandler(finder_Click);
+			finder.Filter_Changed += new EventHandler(finder_Filter_Changed);
 		}
 
 		/// <summary>

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Catalog.xml
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Catalog.xml?rev=330618&r1=330617&r2=330618&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Catalog.xml (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Catalog.xml Thu Nov  3 12:02:39
2005
@@ -19,6 +19,7 @@
 				<value>hired</value>
 				<value>hours</value>
 				<value>editor</value>
+				<value>initial</value>
 				<value>item_offset</value>
 				<value>item_limit</value>
 			</list>
@@ -93,6 +94,16 @@
 	<property name="RelatedIDs"><list><value>hours_list</value></list></property>

   </object>
   
+	<object id="entry_initial" parent="EntryInitial">
+		<property name="ID">
+			<value>entry_initial</value>
+		</property>
+		<property name="RelatedIDs">
+			<list>
+				<value>entry_initial</value>
+			</list>		
+		</property>
+	</object>
   
 	<!-- chains -->
     

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Web/Web.csproj
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Web.csproj?rev=330618&r1=330617&r2=330618&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Web.csproj (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Web.csproj Thu Nov  3 12:02:39 2005
@@ -227,6 +227,22 @@
                     BuildAction = "EmbeddedResource"
                 />
                 <File
+                    RelPath = "Controls\InitialFilter.ascx"
+                    SubType = "UserControl"
+                    BuildAction = "Content"
+                />
+                <File
+                    RelPath = "Controls\InitialFilter.ascx.cs"
+                    DependentUpon = "InitialFilter.ascx"
+                    SubType = "Code"
+                    BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Controls\InitialFilter.ascx.resx"
+                    DependentUpon = "InitialFilter.ascx.cs"
+                    BuildAction = "EmbeddedResource"
+                />
+                <File
                     RelPath = "Controls\Lister.ascx"
                     SubType = "UserControl"
                     BuildAction = "Content"



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


Mime
View raw message