Author: husted
Date: Fri Oct 21 13:30:16 2005
New Revision: 327263

URL: http://svn.apache.org/viewcvs?rev=327263&view=rev
Log:
OVR-18
* Add Criteria property to IProfile, UserProfile to store runtime defaults.

Modified:
    struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/IViewHelper.cs
    struts/sandbox/trunk/overdrive/Nexus/Core/Profile/IProfile.cs
    struts/sandbox/trunk/overdrive/Nexus/Core/Profile/UserProfile.cs
    struts/sandbox/trunk/overdrive/Nexus/Test/Helpers/ViewHelperTest.cs
    struts/sandbox/trunk/overdrive/Nexus/Test/Test.csproj
    struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Core.dll
    struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Core.pdb
    struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Core.xml
    struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Extras.dll
    struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Extras.pdb
    struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Test.dll
    struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Test.pdb
    struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Test.xml
    struts/sandbox/trunk/overdrive/Nexus/Web/FindControl.ascx.cs
    struts/sandbox/trunk/overdrive/Nexus/Web/ViewControl.ascx.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=327263&r1=327262&r2=327263&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/IViewHelper.cs (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Core/Helpers/IViewHelper.cs Fri Oct 21 
13:30:16 2005
@@ -39,7 +39,7 @@
                /// 
                void Execute();
 
-               // <summary>
+               /// <summary>
                /// Read input into the Criteria from a given Dictionary.
                /// </summary>
                /// <param name="criteria">Attributes to add to Critiera</param>

Modified: struts/sandbox/trunk/overdrive/Nexus/Core/Profile/IProfile.cs
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Core/Profile/IProfile.cs?rev=327263&r1=327262&r2=327263&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Core/Profile/IProfile.cs (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Core/Profile/IProfile.cs Fri Oct 21 
13:30:16 2005
@@ -1,3 +1,4 @@
+using System.Collections;
 using System.Globalization;
 
 namespace Nexus.Core.Profile
@@ -5,16 +6,25 @@
        /// <summary>
        /// Record user settings.
        /// </summary>
+       /// 
        public interface IProfile
        {
                /// <summary>
                /// Record the User ID.
                /// </summary>
+               /// 
                string UserId { get; set; }
 
                /// <summary>
                /// Record the User Locale.
                /// </summary>
+               /// 
                CultureInfo UserLocale { get; set; }
+
+               /// <summary>
+               /// Record other default settings.
+               /// </summary>
+               /// 
+               IDictionary Criteria { get; set; }
        }
 }

Modified: struts/sandbox/trunk/overdrive/Nexus/Core/Profile/UserProfile.cs
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Core/Profile/UserProfile.cs?rev=327263&r1=327262&r2=327263&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Core/Profile/UserProfile.cs (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Core/Profile/UserProfile.cs Fri Oct 21 
13:30:16 2005
@@ -1,4 +1,5 @@
 using System;
+using System.Collections;
 using System.Globalization;
 using System.Security.Principal;
 
@@ -68,7 +69,7 @@
                /// Record the user id portion of the Identity Name.
                /// </summary>
                /// <remarks><p>
-               /// The UserId can be used to related staff records to user 
logins.
+               /// The UserId can be used to relate staff records to user 
logins.
                /// </p></remarks>
                public string UserId
                {
@@ -85,12 +86,36 @@
 
                #region UserLocale 
 
+               /// <summary>
+               /// Provide a field for UserLocale property.
+               /// </summary>
                private CultureInfo _UserLocale;
 
                public CultureInfo UserLocale
                {
                        get { return _UserLocale; }
                        set { _UserLocale = value; }
+               }
+
+               #endregion
+
+               #region Criteria
+
+               /// <summary>
+               /// Provide a field for Criteria property.
+               /// </summary>
+               /// 
+               private IDictionary _Criteria;
+
+               public IDictionary Criteria
+               {
+                       get
+                       {
+                               if (_Criteria==null) 
+                                       _Criteria = new Hashtable();
+                               return _Criteria;
+                       }
+                       set { _Criteria = value; }
                }
 
                #endregion

Modified: struts/sandbox/trunk/overdrive/Nexus/Test/Helpers/ViewHelperTest.cs
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Test/Helpers/ViewHelperTest.cs?rev=327263&r1=327262&r2=327263&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Test/Helpers/ViewHelperTest.cs 
(original)
+++ struts/sandbox/trunk/overdrive/Nexus/Test/Helpers/ViewHelperTest.cs Fri Oct 
21 13:30:16 2005
@@ -15,6 +15,7 @@
  */
 using System;
 using Agility.Core;
+using Nexus.Web;
 using NUnit.Framework;
 
 namespace Nexus.Core.Helpers

Modified: struts/sandbox/trunk/overdrive/Nexus/Test/Test.csproj
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Test/Test.csproj?rev=327263&r1=327262&r2=327263&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Test/Test.csproj (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Test/Test.csproj Fri Oct 21 13:30:16 
2005
@@ -105,6 +105,11 @@
                     Project = "{7931CACD-0E73-4DD2-A373-FF6A01CE6186}"
                     Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
                 />
+                <Reference
+                    Name = "Web"
+                    Project = "{2BD7CDE0-01F7-4CC5-9AE9-2F9470FB7007}"
+                    Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
+                />
             </References>
         </Build>
         <Files>
@@ -151,11 +156,6 @@
                 />
                 <File
                     RelPath = "Commands\ObjectByKey.cs"
-                    SubType = "Code"
-                    BuildAction = "Compile"
-                />
-                <File
-                    RelPath = "Helpers\ViewHelperTest.cs"
                     SubType = "Code"
                     BuildAction = "Compile"
                 />

Modified: struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Core.dll
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Core.dll?rev=327263&r1=327262&r2=327263&view=diff
==============================================================================
Binary files - no diff available.

Modified: struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Core.pdb
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Core.pdb?rev=327263&r1=327262&r2=327263&view=diff
==============================================================================
Binary files - no diff available.

Modified: struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Core.xml
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Core.xml?rev=327263&r1=327262&r2=327263&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Core.xml 
(original)
+++ struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Core.xml Fri Oct 
21 13:30:16 2005
@@ -61,7 +61,38 @@
             </summary>
             
         </member>
-        <!-- Badly formed XML comment ignored for member 
"M:Nexus.Core.Helpers.IViewHelper.Read(System.Collections.IDictionary,System.Boolean)"
 -->
+        <member 
name="M:Nexus.Core.Helpers.IViewHelper.Read(System.Collections.IDictionary,System.Boolean)">
+            <summary>
+            Read input into the Criteria from a given Dictionary.
+            </summary>
+            <param name="criteria">Attributes to add to Critiera</param>
+            <param name="nullIfEmpty">Set attributes for empty strings to 
null</param>
+            
+        </member>
+        <member 
name="M:Nexus.Core.Helpers.IViewHelper.AlertsFor(System.String)">
+            <summary>
+            Return the Alerts for the specifiied ID, 
+            formatted for display by a UI control.
+            </summary>
+            <remarks>
+            If messages are localized or customized, 
+            the helper will return correct version for the user.
+            UI specific implementation may markup the errors as needed.
+            </remarks>
+            
+        </member>
+        <member 
name="M:Nexus.Core.Helpers.IViewHelper.HintsFor(System.String)">
+            <summary>
+            Return the Hints for the specifiied ID, 
+            formatted for display by a UI control.
+            </summary>
+            <remarks>
+            If messages are localized or customized, 
+            the helper will return correct version for the user.
+            UI specific implementation may markup the errors as needed.
+            </remarks>
+            
+        </member>
         <member name="P:Nexus.Core.Helpers.IViewHelper.Criteria">
             <summary>
             Store input and output values.
@@ -100,6 +131,17 @@
             </remarks>
             
         </member>
+        <member name="P:Nexus.Core.Helpers.IViewHelper.AlertsText">
+            <summary>
+            Return the Alerts, including any Fault, formatted for display by a 
UI control.
+            </summary>
+            <remarks>
+            If messages are localized or customized, 
+            the helper will return correct version for the user.
+            UI specific implementation may markup the errors as needed.
+            </remarks>
+            
+        </member>
         <member name="P:Nexus.Core.Helpers.IViewHelper.HasAlerts">
             <summary>
             Indicate if alerts are queued.
@@ -130,17 +172,6 @@
             <returns>True if all is well.</returns>
             
         </member>
-        <member name="P:Nexus.Core.Helpers.IViewHelper.ErrorsText">
-            <summary>
-            Return the Alerts, including any Fault, formatted for display by a 
UI control.
-            </summary>
-            <remarks>
-            If messages are localized or customized, 
-            the helper will return correct version for the user.
-            UI specific implementation may markup the errors as needed.
-            </remarks>
-            
-        </member>
         <member name="P:Nexus.Core.Helpers.IViewHelper.Hints">
             <summary>
             Record a list of hint (or advisory) messages, 
@@ -289,16 +320,25 @@
             <summary>
             Record user settings.
             </summary>
+            
         </member>
         <member name="P:Nexus.Core.Profile.IProfile.UserId">
             <summary>
             Record the User ID.
             </summary>
+            
         </member>
         <member name="P:Nexus.Core.Profile.IProfile.UserLocale">
             <summary>
             Record the User Locale.
             </summary>
+            
+        </member>
+        <member name="P:Nexus.Core.Profile.IProfile.Criteria">
+            <summary>
+            Record other default settings.
+            </summary>
+            
         </member>
         <member name="T:Nexus.Core.Profile.UserIdentity">
             <summary>
@@ -406,6 +446,17 @@
             <param name="name">A Identity Name that may contain a machine name 
reference</param>
             <returns>Identity name with machine name removed</returns>
         </member>
+        <member name="F:Nexus.Core.Profile.UserProfile._UserLocale">
+            <summary>
+            Provide a field for UserLocale property.
+            </summary>
+        </member>
+        <member name="F:Nexus.Core.Profile.UserProfile._Criteria">
+            <summary>
+            Provide a field for Criteria property.
+            </summary>
+            
+        </member>
         <member name="M:Nexus.Core.Profile.UserProfile.#ctor">
             <summary>
             Instantiate a default profile.
@@ -437,7 +488,7 @@
             Record the user id portion of the Identity Name.
             </summary>
             <remarks><p>
-            The UserId can be used to related staff records to user logins.
+            The UserId can be used to relate staff records to user logins.
             </p></remarks>
         </member>
         <member name="T:Nexus.Core.Tables.FieldContext">

Modified: struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Extras.dll
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Extras.dll?rev=327263&r1=327262&r2=327263&view=diff
==============================================================================
Binary files - no diff available.

Modified: struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Extras.pdb
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Extras.pdb?rev=327263&r1=327262&r2=327263&view=diff
==============================================================================
Binary files - no diff available.

Modified: struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Test.dll
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Test.dll?rev=327263&r1=327262&r2=327263&view=diff
==============================================================================
Binary files - no diff available.

Modified: struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Test.pdb
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Test.pdb?rev=327263&r1=327262&r2=327263&view=diff
==============================================================================
Binary files - no diff available.

Modified: struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Test.xml
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Test.xml?rev=327263&r1=327262&r2=327263&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Test.xml 
(original)
+++ struts/sandbox/trunk/overdrive/Nexus/Test/bin/Debug/Nexus.Test.xml Fri Oct 
21 13:30:16 2005
@@ -222,7 +222,7 @@
             </summary>
             
         </member>
-        <member 
name="M:Nexus.Core.RequestContextTest.IsNominal_Errors_and_Fault">
+        <member 
name="M:Nexus.Core.RequestContextTest.IsNominal_Alerts_and_Fault">
             <summary>
             A IRequestContext is not nominal if multiple errors are added 
             and an Exception is set.

Modified: struts/sandbox/trunk/overdrive/Nexus/Web/FindControl.ascx.cs
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Web/FindControl.ascx.cs?rev=327263&r1=327262&r2=327263&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Web/FindControl.ascx.cs (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Web/FindControl.ascx.cs Fri Oct 21 
13:30:16 2005
@@ -79,18 +79,23 @@
                /// through the standard page error handler.
                /// </p></remarks>
                /// 
-               public virtual void Open()
-               {
+               public virtual bool Open()
+               {                                               
                        IViewHelper helper = ExecuteBind(FindCommand);
-                       if (!helper.IsNominal) Page_Alert = helper;
+                       Bind(Profile.Criteria);
+                       bool okay = helper.IsNominal;
+                       if (!okay) Page_Alert = helper;
+                       return okay;
                }
 
-               public virtual void Open(IDictionary criteria)
+               public virtual bool Open(IDictionary criteria)
                {
                        IViewHelper helper = GetHelperFor(FindCommand);
                        helper.Read(criteria, true);
                        ExecuteBind(helper);
-                       if (!helper.IsNominal) Page_Alert = helper;
+                       bool okay = helper.IsNominal;
+                       if (!okay) Page_Alert = helper;
+                       return okay;
                }
 
                /// <summary>

Modified: struts/sandbox/trunk/overdrive/Nexus/Web/ViewControl.ascx.cs
URL: 
http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Web/ViewControl.ascx.cs?rev=327263&r1=327262&r2=327263&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Web/ViewControl.ascx.cs (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Web/ViewControl.ascx.cs Fri Oct 21 
13:30:16 2005
@@ -315,8 +315,6 @@
                {
                        IViewHelper helper = Catalog.GetHelperFor(command);
                        helper.Profile = Profile;
-                       // IDictionary criteria = Profile.Criteria;
-                       // helper.Read(criteria);
                        return helper;
                }
 



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

Reply via email to