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/09/20 15:30:31 UTC
svn commit: r290448 - in /struts/sandbox/trunk/overdrive/Nexus/Web:
FindControl.ascx FindControl.ascx.cs FindControl.ascx.resx Web.csproj
Author: husted
Date: Tue Sep 20 06:30:24 2005
New Revision: 290448
URL: http://svn.apache.org/viewcvs?rev=290448&view=rev
Log:
OVR-29
* Add a base FindControl. Typically, a FindControl will collect input to filter a list of entries displayed by a GridControl.
Added:
struts/sandbox/trunk/overdrive/Nexus/Web/FindControl.ascx
struts/sandbox/trunk/overdrive/Nexus/Web/FindControl.ascx.cs
struts/sandbox/trunk/overdrive/Nexus/Web/FindControl.ascx.resx
Modified:
struts/sandbox/trunk/overdrive/Nexus/Web/Web.csproj
Added: struts/sandbox/trunk/overdrive/Nexus/Web/FindControl.ascx
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Web/FindControl.ascx?rev=290448&view=auto
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Web/FindControl.ascx (added)
+++ struts/sandbox/trunk/overdrive/Nexus/Web/FindControl.ascx Tue Sep 20 06:30:24 2005
@@ -0,0 +1 @@
+<%@ Control Language="c#" AutoEventWireup="false" Codebehind="FindControl.ascx.cs" Inherits="WQD.Web.Controls.FindControl" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
Added: 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=290448&view=auto
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Web/FindControl.ascx.cs (added)
+++ struts/sandbox/trunk/overdrive/Nexus/Web/FindControl.ascx.cs Tue Sep 20 06:30:24 2005
@@ -0,0 +1,106 @@
+using System;
+using System.Collections;
+using Nexus.Core.Helpers;
+using Nexus.Web.Controls;
+
+namespace WQD.Web.Controls
+{
+
+ /// <summary>
+ /// Base class for find controls.
+ /// </summary>
+ /// <remarks><p>
+ /// Typically, a FindControl will collect input
+ /// to filter a list of entries displayed by a GridControl.
+ /// </p></remarks>
+ public class FindControl : ViewControl
+ {
+
+ /// <summary>
+ /// Provide a field for the FindCommand property.
+ /// </summary>
+ private string _FindCommand;
+
+ /// <summary>
+ /// Provide the command that will populate the data-entry controls.
+ /// </summary>
+ public string FindCommand
+ {
+ get {return _FindCommand;}
+ set {_FindCommand = value;}
+ }
+
+ /// <summary>
+ /// Expose values input by client
+ /// for use by another component.
+ /// </summary>
+ ///
+ public virtual IDictionary Criteria
+ {
+ get
+ {
+ IViewHelper helper = Read(FindCommand);
+ if (!helper.IsNominal)
+ {
+ Page_Error = helper;
+ }
+ return helper.Criteria;
+ }
+ }
+
+ /// <summary>
+ /// Prepare controls for data entry.
+ /// </summary>
+ /// <remarks><p>
+ /// Preparation includes obtaining lists from the
+ /// databases.
+ /// Any errors are reported
+ /// through the standard page error handler.
+ /// </p></remarks>
+ ///
+ public virtual void Open()
+ {
+ if (IsPostBack) return;
+ IViewHelper helper = ExecuteBind(FindCommand);
+ if (!helper.IsNominal) Page_Error = helper;
+ }
+
+ /// <summary>
+ /// Wire the event handlers and set defaults.
+ /// </summary>
+ /// <param name="sender">Source</param>
+ /// <param name="e">Runtime parameters</param>
+ ///
+ private void Page_Load(object sender, System.EventArgs e)
+ {
+ // Put user code to initialize the page here
+ }
+
+ #region Web Form Designer generated code
+
+ /// <summary>
+ /// Initialize components.
+ /// </summary>
+ /// <param name="e">Runtime parameters</param>
+ ///
+ override protected void OnInit(EventArgs e)
+ {
+ //
+ // CODEGEN: This call is required by the ASP.NET Web Form Designer.
+ //
+ InitializeComponent();
+ base.OnInit(e);
+ }
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ ///
+ private void InitializeComponent()
+ {
+ this.Load += new System.EventHandler(this.Page_Load);
+ }
+ #endregion
+ }
+}
Added: struts/sandbox/trunk/overdrive/Nexus/Web/FindControl.ascx.resx
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Web/FindControl.ascx.resx?rev=290448&view=auto
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Web/FindControl.ascx.resx (added)
+++ struts/sandbox/trunk/overdrive/Nexus/Web/FindControl.ascx.resx Tue Sep 20 06:30:24 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/Nexus/Web/Web.csproj
URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/overdrive/Nexus/Web/Web.csproj?rev=290448&r1=290447&r2=290448&view=diff
==============================================================================
--- struts/sandbox/trunk/overdrive/Nexus/Web/Web.csproj (original)
+++ struts/sandbox/trunk/overdrive/Nexus/Web/Web.csproj Tue Sep 20 06:30:24 2005
@@ -119,6 +119,22 @@
BuildAction = "Compile"
/>
<File
+ RelPath = "FindControl.ascx"
+ SubType = "UserControl"
+ BuildAction = "Content"
+ />
+ <File
+ RelPath = "FindControl.ascx.cs"
+ DependentUpon = "FindControl.ascx"
+ SubType = "ASPXCodeBehind"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "FindControl.ascx.resx"
+ DependentUpon = "FindControl.ascx.cs"
+ BuildAction = "EmbeddedResource"
+ />
+ <File
RelPath = "Global.asax"
SubType = "Component"
BuildAction = "Content"
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org