Author: husted
Date: Tue Jun 21 10:04:57 2005
New Revision: 191686

URL: http://svn.apache.org/viewcvs?rev=191686&view=rev
Log:
OVR-5
* Add and pass filter test for last name.
* Rename lstLastNames filter to last_name_list 
* Refactor filter lists as IKeyValueList
* Add stub field table. 
* Add ErrorPanel to display any Faults from database.

Added:
    struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/AppBase.xml
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Objects.xml
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Command/AppBase.xml
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Query/FilterLists.xml
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Query/properties.xml
Modified:
    struts/sandbox/trunk/overdrive/PhoneBook/Core/App.cs
    struts/sandbox/trunk/overdrive/PhoneBook/Core/Commands/BaseFilterList.cs
    struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/DirectoryViewTest.cs
    struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/FilterLists.cs
    struts/sandbox/trunk/overdrive/PhoneBook/Test/Forms/DirectoryTest.cs
    struts/sandbox/trunk/overdrive/PhoneBook/Test/Objects.xml
    
struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/AppConfig.xml
    struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/Catalog.xml
    struts/sandbox/trunk/overdrive/PhoneBook/Test/Test.csproj
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx.cs
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Command/AppConfig.xml
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Command/Catalog.xml
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Web.config
    struts/sandbox/trunk/overdrive/PhoneBook/Web/Web.csproj
    struts/sandbox/trunk/overdrive/PhoneBook/Web/sqlmap.config

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Core/App.cs
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Core/App.cs?rev=191686&r1=191685&r2=191686&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Core/App.cs (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Core/App.cs Tue Jun 21 10:04:57 
2005
@@ -79,7 +79,7 @@
                /// Token for List Last Names command.
                /// </summary>
                /// 
-               public const string LIST_LAST_NAMES = "list_last_names";
+               public const string LAST_NAME_LIST = "last_name_list";
 
                /// <summary>
                /// Token for Directory View command.

Modified: 
struts/sandbox/trunk/overdrive/PhoneBook/Core/Commands/BaseFilterList.cs
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Core/Commands/BaseFilterList.cs?rev=191686&r1=191685&r2=191686&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Core/Commands/BaseFilterList.cs 
(original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Core/Commands/BaseFilterList.cs 
Tue Jun 21 10:04:57 2005
@@ -28,7 +28,12 @@
                public override bool RequestExecute (IRequestContext context)
                {
                        IList rows = Mapper ().QueryForList (QueryID, null);
-                       context [ID] = rows;
+                       IKeyValueList list = new KeyValueList ();
+                       foreach (string key in rows)
+                       {
+                               list.Add (new KeyValue (key, key));
+                       }
+                       context [ID] = list;
                        return CONTINUE;
                }
        }

Modified: 
struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/DirectoryViewTest.cs
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/DirectoryViewTest.cs?rev=191686&r1=191685&r2=191686&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/DirectoryViewTest.cs 
(original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/DirectoryViewTest.cs 
Tue Jun 21 10:04:57 2005
@@ -19,14 +19,14 @@
                public void ContainsFilters ()
                {
                        IRequestContext context = catalog.ExecuteRequest 
(App.DIRECTORY_VIEW);
-                       string[] keys = {App.LIST_LAST_NAMES};
+                       string[] keys = {App.LAST_NAME_LIST};
                        foreach (string key in keys)
                        {
                                Assert.IsTrue (context.Contains (key), key + ": 
Expected context to contain key.");
                        }
                }
 
-               // TODO: [Test]
+               [Test]
                public void HelperContains ()
                {
                        IViewHelper helper = catalog.GetHelper 
(App.DIRECTORY_VIEW_HELPER);

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=191686&r1=191685&r2=191686&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/FilterLists.cs 
(original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Test/Commands/FilterLists.cs Tue 
Jun 21 10:04:57 2005
@@ -36,14 +36,17 @@
                private void FilterList_Result (IRequestContext context)
                {
                        IList list = AssertListOutcome (context);
-                       foreach (string key in list)
+                       foreach (IKeyValue item in list)
                        {
-                               Assert.IsNotNull (key, "Expected each item to 
be non-null");
-                               Assert.IsTrue (key.Length > 0, "Expected each 
item to be non-empty");
+                               Assert.IsNotNull (item, "Expected each item to 
be non-null");
+                               string key = item.Value as string;
+                               Assert.IsNotNull (key,"Expected each key to be 
non-null");
+                               Assert.IsTrue (key.Length > 0, "Expected each 
key to be non-empty");
                        }
                        IDictionary keys = new Hashtable (list.Count);
-                       foreach (string key in list)
+                       foreach (IKeyValue item in list)
                        {
+                               string key = item.Value as string;              
        
                                if (keys.Contains (key)) Assert.Fail (key + ": 
Expected each item to be unique");
                                keys.Add (key, key);
                        }
@@ -56,7 +59,7 @@
                [Test]
                public void TestLastNameFilterList ()
                {
-                       IRequestContext context = catalog.ExecuteRequest 
(App.LIST_LAST_NAMES);
+                       IRequestContext context = catalog.ExecuteRequest 
(App.LAST_NAME_LIST);
                        FilterList_Result (context);
                }
 

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Test/Forms/DirectoryTest.cs
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Test/Forms/DirectoryTest.cs?rev=191686&r1=191685&r2=191686&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Test/Forms/DirectoryTest.cs 
(original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Test/Forms/DirectoryTest.cs Tue 
Jun 21 10:04:57 2005
@@ -16,6 +16,7 @@
 using NUnit.Extensions.Asp;
 using NUnit.Extensions.Asp.AspTester;
 using NUnit.Framework;
+using PhoneBook.Core;
 
 namespace WNE.Core.Forms
 {
@@ -26,7 +27,7 @@
        public class DirectoryTest : WebFormTestCase
        {
                private PanelTester pnlFind;
-               private DropDownListTester lstLastName;
+               private DropDownListTester last_name_list;
                private DropDownListTester lstFirstName;
                private DropDownListTester lstExtension;
                private DropDownListTester lstUserName;
@@ -47,7 +48,7 @@
                /// 
                private DropDownListTester[] GetLists ()
                {
-                       DropDownListTester[] lists = {lstLastName, 
lstFirstName, lstExtension, lstUserName, lstHireDate, lstHours, lstEditor};
+                       DropDownListTester[] lists = {last_name_list, 
lstFirstName, lstExtension, lstUserName, lstHireDate, lstHours, lstEditor};
                        return lists;
                }
 
@@ -60,7 +61,7 @@
                        base.SetUp ();
 
                        pnlFind = new PanelTester ("pnlFind", CurrentWebForm);
-                       lstLastName = new DropDownListTester ("lstLastName", 
CurrentWebForm);
+                       last_name_list = new DropDownListTester 
(App.LAST_NAME_LIST, CurrentWebForm);
                        lstFirstName = new DropDownListTester ("lstFirstName", 
CurrentWebForm);
                        lstExtension = new DropDownListTester ("lstExtension", 
CurrentWebForm);
                        lstUserName = new DropDownListTester ("lstUserName", 
CurrentWebForm);

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Test/Objects.xml
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Test/Objects.xml?rev=191686&r1=191685&r2=191686&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Test/Objects.xml (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Test/Objects.xml Tue Jun 21 
10:04:57 2005
@@ -5,6 +5,7 @@
 
        <object id="Base" />
        
+       <import resource="Resources/Command/AppBase.xml"/>
        <import resource="Resources/Command/AppConfig.xml"/>
        <import resource="Resources/Command/Catalog.xml"/>
        

Added: 
struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/AppBase.xml
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/AppBase.xml?rev=191686&view=auto
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/AppBase.xml 
(added)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/AppBase.xml 
Tue Jun 21 10:04:57 2005
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?> 
+<objects xmlns="http://www.springframework.net"; 
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
+       xsi:schemaLocation="http://www.springframework.net 
http://www.springframework.net/xsd/spring-objects.xsd";>
+
+       <object id="BaseChain" type="Nexus.Core.RequestChain, 
Nexus.Core"></object>
+
+</objects>
\ No newline at end of file

Modified: 
struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/AppConfig.xml
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/AppConfig.xml?rev=191686&r1=191685&r2=191686&view=diff
==============================================================================
--- 
struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/AppConfig.xml 
(original)
+++ 
struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/AppConfig.xml 
Tue Jun 21 10:04:57 2005
@@ -7,9 +7,44 @@
  
        <object id="Catalog" type="Nexus.Extras.Spring.Catalog"/>
  
+
  <!-- FieldTable -->
- 
+                               
        <object id="FieldTable" type="Nexus.Core.Tables.FieldTable">
        </object>
+       
+<!-- Validators -->
+       
+  <object id="convert_input" type="Nexus.Core.Validators.ConvertInput">
+    <property name="ID"><value>ConvertInput</value></property>
+    <property name="Template"><value>{0} is required.</value></property>
+  </object>
+
+  <object id="format_output" type="Nexus.Core.Validators.FormatOutput">
+    <property name="ID"><value>FormatOutput</value></property>    
+    <property name="Template"><value>{0} is required.</value></property>
+  </object>
+  
+
+<!-- pre-op -->
+
+  <object id="pre-op" parent="BaseChain">
+       <property name="AddCommands">
+               <list>
+                       <ref object="convert_input"/>
+               </list>   
+    </property>           
+  </object>  
+
+  
+<!-- post-op -->
 
+  <object id="post-op" parent="BaseChain">
+       <property name="AddCommands">
+               <list>
+                       <ref object="format_output"/>
+               </list>   
+    </property>           
+  </object>
+               
 </objects>

Modified: 
struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/Catalog.xml
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/Catalog.xml?rev=191686&r1=191685&r2=191686&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/Catalog.xml 
(original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Test/Resources/Command/Catalog.xml 
Tue Jun 21 10:04:57 2005
@@ -7,27 +7,33 @@
        <property name="ID"><value>select_all</value></property>
   </object>
 
-  <object id="list_last_names" type="PhoneBook.Core.Commands.BaseFilterList, 
PhoneBook.Core">
-       <property name="ID"><value>list_last_names</value></property>
+  <object id="last_name_list" type="PhoneBook.Core.Commands.BaseFilterList, 
PhoneBook.Core">
+       <property name="ID"><value>last_name_list</value></property>
   </object>
   
-    <object id="directory_view" type="Nexus.Core.RequestChain, Nexus.Core">
+    <object id="directory_view" parent="BaseChain">
                <property name="ID">
                        <value>directory_view</value>
                </property>
                <property name="RelatedIDs">
                        <list>
-                               <value>list_last_names</value>
+                               <value>last_name_list</value>
                        </list>
                </property>
                <property name="AddCommands">
                        <list>
-                               <ref object="list_last_names" />
+                               <ref object="last_name_list" />
                        </list>
                </property>
        </object>
 
   <object id="directory_view_helper" type="PhoneBook.Web.AppHelper, 
PhoneBook.Web">
+               <property name="Catalog">
+                       <ref object="Catalog" />
+               </property>
+               <property name="Command">
+                       <ref object="directory_view" />
+               </property>
   </object>
 
 </objects>

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Test/Test.csproj
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Test/Test.csproj?rev=191686&r1=191685&r2=191686&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Test/Test.csproj (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Test/Test.csproj Tue Jun 21 
10:04:57 2005
@@ -120,6 +120,11 @@
                     AssemblyName = "NUnitAsp"
                     HintPath = "..\..\NUnitAsp.bin\NUnitAsp.dll"
                 />
+                <Reference
+                    Name = "Web"
+                    Project = "{948EE344-D033-4358-88E8-77FDE080D93C}"
+                    Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+                />
             </References>
         </Build>
         <Files>
@@ -169,6 +174,10 @@
                     RelPath = "Forms\DirectoryTest.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
+                />
+                <File
+                    RelPath = "Resources\Command\AppBase.xml"
+                    BuildAction = "Content"
                 />
                 <File
                     RelPath = "Resources\Command\AppConfig.xml"

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx?rev=191686&r1=191685&r2=191686&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx Tue Jun 
21 10:04:57 2005
@@ -13,6 +13,12 @@
                <h1>PhoneBook Directory</h1>
                        <form id="frmDirectory" method="post" runat="server">
                        
+                       <!-- ERROR -->
+                       <asp:Panel ID="pnlError" Runat="server">
+                       <p><asp:Label ID="lblError" 
Runat="server"></asp:Label></p>
+                       <hr>
+                       </asp:Panel>
+                       
                        <!-- PROMPT -->
                        <p>Select a filter to display fewer entries.</p>        
 
@@ -32,7 +38,7 @@
                          <td>Hours</td>                          
                          <td>Editor</td>                         
                          </tr><tr>
-                         <td><asp:DropDownList ID="lstLastName" 
Runat=server></asp:DropDownList></td>
+                         <td><asp:DropDownList ID="last_name_list" 
Runat=server></asp:DropDownList></td>
                          <td><asp:DropDownList ID="lstFirstName" 
Runat=server></asp:DropDownList></td>
                          <td><asp:DropDownList ID="lstExtension" 
Runat=server></asp:DropDownList></td>
                          <td><asp:DropDownList ID="lstUserName" 
Runat=server></asp:DropDownList></td>

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=191686&r1=191685&r2=191686&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx.cs 
(original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Forms/Directory.aspx.cs Tue 
Jun 21 10:04:57 2005
@@ -3,6 +3,7 @@
 using System.Web.UI;
 using System.Web.UI.WebControls;
 using Nexus.Core;
+using Nexus.Core.Helpers;
 using PhoneBook.Core;
 using PhoneBook.Core.Commands;
 
@@ -22,19 +23,34 @@
 
                #endregion
 
-               #region Properties 
+               #region Page Properties 
+
+               protected Panel pnlError;
+               protected Label lblError;
+
+               /// <summary>
+               /// Display a list of error mesasges.
+               /// </summary>
+               public IViewHelper Page_Error
+               {
+                       set
+                       {
+                               lblError.Text = value.ErrorsText;
+                               pnlError.Visible = true;
+                       }
+               }
 
                /// <summary>
                /// Field for ViewHelper.
                /// </summary>
                /// 
-               private AppHelper _ViewHelper;
+               private IViewHelper _ViewHelper;
 
                /// <summary>
                /// Obtain dynamic data for the default view.
                /// </summary>
                ///
-               public virtual AppHelper ViewHelper
+               public virtual IViewHelper ViewHelper
                {
                        get { return _ViewHelper; }
                        set { _ViewHelper = value; }
@@ -55,7 +71,7 @@
                #region Find
 
                protected Panel pnlFind;
-               protected DropDownList lstLastName;
+               protected DropDownList last_name_list;
                protected DropDownList lstFirstName;
                protected DropDownList lstExtension;
                protected DropDownList lstUserName;
@@ -69,7 +85,7 @@
 
                private DropDownList[] GetLists ()
                {
-                       DropDownList[] lists = {lstLastName, lstFirstName, 
lstExtension, lstUserName, lstHireDate, lstHours, lstEditor};
+                       DropDownList[] lists = {last_name_list, lstFirstName, 
lstExtension, lstUserName, lstHireDate, lstHours, lstEditor};
                        return lists;
                }
 
@@ -84,6 +100,14 @@
                        }
                }
 
+               private void Find_Load ()
+               {
+                       IViewHelper h = ViewHelper;
+                       h.ExecuteBind (pnlFind.Controls);
+                       bool ok = (h.IsNominal);
+                       if (!ok)
+                               Page_Error = h;
+               }
 
                // postback events - These events respond to user input (to 
controls displayed by pageload methods)
 
@@ -143,6 +167,7 @@
 
                protected void Page_Init ()
                {
+                       pnlError.Visible = false;
                        Find_Init ();
                        List_Init ();
                }
@@ -152,7 +177,11 @@
                        if (IsPostBack)
                                Find_Filter (sender, e);
                        else
-                               ViewHelper.ExecuteBind (pnlFind.Controls);
+                       {
+                               Find_Load ();
+                               List_Load ();
+                       }
                }
+
        }
 }

Added: struts/sandbox/trunk/overdrive/PhoneBook/Web/Objects.xml
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Objects.xml?rev=191686&view=auto
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Objects.xml (added)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Objects.xml Tue Jun 21 
10:04:57 2005
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8" ?> 
+<objects xmlns="http://www.springframework.net"; 
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
+       xsi:schemaLocation="http://www.springframework.net 
http://www.springframework.net/xsd/spring-objects.xsd";>
+
+       <object id="Base" />
+       
+       <import resource="Resources/Command/AppBase.xml"/>
+       <import resource="Resources/Command/AppConfig.xml"/>
+       <import resource="Resources/Command/Catalog.xml"/>
+       
+</objects>

Added: 
struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Command/AppBase.xml
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Command/AppBase.xml?rev=191686&view=auto
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Command/AppBase.xml 
(added)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Command/AppBase.xml 
Tue Jun 21 10:04:57 2005
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?> 
+<objects xmlns="http://www.springframework.net"; 
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
+       xsi:schemaLocation="http://www.springframework.net 
http://www.springframework.net/xsd/spring-objects.xsd";>
+
+       <object id="BaseChain" type="Nexus.Core.RequestChain, 
Nexus.Core"></object>
+
+</objects>
\ No newline at end of file

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=191686&r1=191685&r2=191686&view=diff
==============================================================================
--- 
struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Command/AppConfig.xml 
(original)
+++ 
struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Command/AppConfig.xml 
Tue Jun 21 10:04:57 2005
@@ -3,7 +3,48 @@
   "http://www.springframework.net/dtd/spring-objects.dtd";>
 <objects>
 
-  <object id="Controller" type="Nexus.Extras.Spring.Controller, Nexus.Extras">
+ <!-- Catalog -->
+ 
+       <object id="Catalog" type="Nexus.Extras.Spring.Catalog"/>
+ 
+
+ <!-- FieldTable -->
+                               
+       <object id="FieldTable" type="Nexus.Core.Tables.FieldTable">
+       </object>
+       
+<!-- Validators -->
+       
+  <object id="convert_input" type="Nexus.Core.Validators.ConvertInput">
+    <property name="ID"><value>ConvertInput</value></property>
+    <property name="Template"><value>{0} is required.</value></property>
+  </object>
+
+  <object id="format_output" type="Nexus.Core.Validators.FormatOutput">
+    <property name="ID"><value>FormatOutput</value></property>    
+    <property name="Template"><value>{0} is required.</value></property>
   </object>
+  
+
+<!-- pre-op -->
 
+  <object id="pre-op" parent="BaseChain">
+       <property name="AddCommands">
+               <list>
+                       <ref object="convert_input"/>
+               </list>   
+    </property>           
+  </object>  
+
+  
+<!-- post-op -->
+
+  <object id="post-op" parent="BaseChain">
+       <property name="AddCommands">
+               <list>
+                       <ref object="format_output"/>
+               </list>   
+    </property>           
+  </object>
+               
 </objects>

Modified: 
struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Command/Catalog.xml
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Command/Catalog.xml?rev=191686&r1=191685&r2=191686&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Command/Catalog.xml 
(original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Command/Catalog.xml 
Tue Jun 21 10:04:57 2005
@@ -3,6 +3,37 @@
   "http://www.springframework.net/dtd/spring-objects.dtd";>
 <objects>
 
-</objects>
+  <object id="select_all" type="PhoneBook.Core.Commands.BaseList, 
PhoneBook.Core">
+       <property name="ID"><value>select_all</value></property>
+  </object>
+
+  <object id="last_name_list" type="PhoneBook.Core.Commands.BaseFilterList, 
PhoneBook.Core">
+       <property name="ID"><value>last_name_list</value></property>
+  </object>
+  
+    <object id="directory_view" parent="BaseChain">
+               <property name="ID">
+                       <value>directory_view</value>
+               </property>
+               <property name="RelatedIDs">
+                       <list>
+                               <value>last_name_list</value>
+                       </list>
+               </property>
+               <property name="AddCommands">
+                       <list>
+                               <ref object="last_name_list" />
+                       </list>
+               </property>
+       </object>
 
+  <object id="directory_view_helper" type="PhoneBook.Web.AppHelper, 
PhoneBook.Web">
+               <property name="Catalog">
+                       <ref object="Catalog" />
+               </property>
+               <property name="Command">
+                       <ref object="directory_view" />
+               </property>
+  </object>
 
+</objects>

Added: 
struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Query/FilterLists.xml
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Query/FilterLists.xml?rev=191686&view=auto
==============================================================================
--- 
struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Query/FilterLists.xml 
(added)
+++ 
struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Query/FilterLists.xml 
Tue Jun 21 10:04:57 2005
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8" ?> 
+
+<sqlMap 
+       namespace="PhoneBook" 
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
+       xsi:noNamespaceSchemaLocation="SqlMap.xsd" >
+       
+       <statements>
+               <select id="last_name_list" resultClass="string">
+                       SELECT DISTINCT 
+                               last_name
+                       FROM entry
+                       ORDER BY last_name                      
+               </select>
+       </statements>
+
+</sqlMap>

Added: 
struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Query/properties.xml
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Query/properties.xml?rev=191686&view=auto
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Query/properties.xml 
(added)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Resources/Query/properties.xml 
Tue Jun 21 10:04:57 2005
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?> 
+<settings>
+       <add key="provider" value="ByteFx" />
+       <add key="development" 
value="Host=localhost;Database=phonebook;Username=root" />
+       <add key="production" 
value="Host=zippy;Database=phonebook;Username=phonebookApp;Password=p1nH34d" />
+</settings>
+

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Web/Web.config
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Web.config?rev=191686&r1=191685&r2=191686&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Web.config (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Web.config Tue Jun 21 10:04:57 
2005
@@ -9,6 +9,7 @@
 
     <spring>
         <context type="Spring.Context.Support.WebApplicationContext, 
Spring.Web">
+            <resource uri="~/Objects.xml"/>
         </context>
     </spring>  
     

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Web/Web.csproj
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/Web.csproj?rev=191686&r1=191685&r2=191686&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/Web.csproj (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/Web.csproj Tue Jun 21 10:04:57 
2005
@@ -174,6 +174,10 @@
                     BuildAction = "EmbeddedResource"
                 />
                 <File
+                    RelPath = "Objects.xml"
+                    BuildAction = "Content"
+                />
+                <File
                     RelPath = "providers.config"
                     BuildAction = "Content"
                 />
@@ -214,6 +218,10 @@
                     BuildAction = "Content"
                 />
                 <File
+                    RelPath = "Resources\Command\AppBase.xml"
+                    BuildAction = "Content"
+                />
+                <File
                     RelPath = "Resources\Command\AppConfig.xml"
                     BuildAction = "Content"
                 />
@@ -223,6 +231,14 @@
                 />
                 <File
                     RelPath = "Resources\Query\default.xml"
+                    BuildAction = "Content"
+                />
+                <File
+                    RelPath = "Resources\Query\FilterLists.xml"
+                    BuildAction = "Content"
+                />
+                <File
+                    RelPath = "Resources\Query\properties.xml"
                     BuildAction = "Content"
                 />
                 <File

Modified: struts/sandbox/trunk/overdrive/PhoneBook/Web/sqlmap.config
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/PhoneBook/Web/sqlmap.config?rev=191686&r1=191685&r2=191686&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/PhoneBook/Web/sqlmap.config (original)
+++ struts/sandbox/trunk/overdrive/PhoneBook/Web/sqlmap.config Tue Jun 21 
10:04:57 2005
@@ -18,6 +18,7 @@
        <sqlMaps>
                <sqlMap resource="${root}/Resources/Query/default.xml"/>
                <sqlMap resource="${root}/Resources/Query/SelectAll.xml"/>
+               <sqlMap resource="${root}/Resources/Query/FilterLists.xml"/>
        </sqlMaps>
 
 </sqlMapConfig>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to