Update of /cvsroot/springnet/Spring.Net/doc/reference/src
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14473
Modified Files:
ajax.xml index.xml objects.xml vsnet.xml web.xml
Log Message:
misc improvements.
Index: index.xml
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/index.xml,v
retrieving revision 1.77
retrieving revision 1.78
diff -C2 -d -r1.77 -r1.78
*** index.xml 6 Dec 2007 08:06:41 -0000 1.77
--- index.xml 20 Dec 2007 16:33:52 -0000 1.78
***************
*** 70,73 ****
--- 70,77 ----
</author>
<author>
+ <firstname>Bruno</firstname>
+ <surname>Baia</surname>
+ </author>
+ <author>
<firstname>Federico</firstname>
<surname>Spinazzi</surname>
Index: vsnet.xml
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/vsnet.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** vsnet.xml 1 May 2006 23:10:02 -0000 1.11
--- vsnet.xml 20 Dec 2007 16:33:52 -0000 1.12
***************
*** 1,23 ****
<chapter id="vsnet">
<title>Visual Studio.NET Integration</title>
<sect1 id="vsnet-config-section">
<title>XML Editing and Validation</title>
! <para><emphasis>(Available in 1.0)</emphasis></para>
! <para>Most of this section is well traveled territory for those
! familiar with editing XML files in their favorite XML editor.
! The XML configuration data that defines the objects that Spring will
! manage for you are validated against the Spring.NET XML Schema
! at runtime.
! The location of the XML configuration data to create an
! <literal>IApplicationContext</literal> can be any of the resource
! locations supported by Spring's
! <classname>IResource</classname> abstraction. (See
! <xref linkend="objects-iresource"/> for more information.)
! To create an <classname>IApplicationContext</classname>
! using a "standalone" XML configuration file the custom configuration
! section in the standard .NET application configuration would
! read:
! </para>
! <programlisting><spring>
<context>
--- 1,28 ----
+ <?xml version="1.0" encoding="UTF-8"?>
<chapter id="vsnet">
<title>Visual Studio.NET Integration</title>
+
<sect1 id="vsnet-config-section">
+
+
<title>XML Editing and Validation</title>
!
!
!
! <para>Most of this section is well traveled territory for those familiar
! with editing XML files in their favorite XML editor. The XML configuration
! data that defines the objects that Spring will manage for you are
! validated against the Spring.NET XML Schema at runtime. The location of
! the XML configuration data to create an
! <literal>IApplicationContext</literal> can be any of the resource
! locations supported by Spring's <classname>IResource</classname>
! abstraction. (See <xref linkend="objects-iresource" /> for more
! information.) To create an <classname>IApplicationContext</classname>
! using a "standalone" XML configuration file the custom configuration
! section in the standard .NET application configuration would read:</para>
!
!
!
! <programlisting><spring>
<context>
***************
*** 26,38 ****
</spring></programlisting>
! The VS.NET 2005 XML editor can use the attribute <literal>xsi:schemaLocation</literal>
! as a hint to associate the physical location of a schema file with the XML
! document being edited. VS.NET 2002/2003 do not recognize the
! <literal>xsi:schemaLocation</literal> element. If you reference the Spring.NET XML
! schema as shown below, you can get IntelliSense and validation support while editing
! a Spring configuration file in VS.NET 2005. In order to get this functionality
! in VS.NET 2002/2003 you you will need to register the schema with VS.NET or include the
! schema as part of your application project.
! <programlisting><?xml version="1.0" encoding="UTF-8"?>
<objects xmlns="http://www.springframework.net"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
--- 31,46 ----
</spring></programlisting>
!
! The VS.NET 2005 XML editor can use the attribute
!
! <literal>xsi:schemaLocation</literal>
!
! as a hint to associate the physical location of a schema file with the XML document being edited. VS.NET 2002/2003 do not recognize the
!
! <literal>xsi:schemaLocation</literal>
!
! element. If you reference the Spring.NET XML schema as shown below, you can get IntelliSense and validation support while editing a Spring configuration file in VS.NET 2005. In order to get this functionality in VS.NET 2002/2003 you you will need to register the schema with VS.NET or include the schema as part of your application project.
!
! <programlisting><?xml version="1.0" encoding="UTF-8"?>
<objects xmlns="http://www.springframework.net"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
***************
*** 46,81 ****
...
</objects></programlisting>
! <para>It is typically more convenient to install the schema in VS.NET, even for
! VS.NET 2005, as it makes the xml a little less verbose and you don't need
! to keep copying the XSD file for each project you create.
! For VS.NET 2003 the schema directory will be either
! </para>
! <para><literal>C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml</literal> for VS.NET 2003
! </para>
<para>or</para>
! <para><literal>C:\Program Files\Microsoft Visual Studio .NET\Common7\Packages\schemas\xml</literal> for VS.NET 2002
! </para>
! <para>
! The VS.NET 2005 directory for XML schemas is
! </para>
! <para><literal>
! C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas
! </literal>
! </para>
! <para>
! As simple aid in this file copy task, you can use the NAnt build file located in
! the <literal>doc/schema</literal> directory
! that comes with Spring and execute
! </para>
! <para><literal>nant</literal></para>
<para>
! The default nant target will copy the file spring-object.xsd
! from the doc/schema directory to the appropriate VS.NET directory.
! </para>
! <para>Once you have registered the schema with VS.NET you can adding
! only the namespace declaration to the objects element,
</para>
<para>
! <programlisting><?xml version="1.0" encoding="UTF-8"?>
<objects xmlns="http://www.springframework.net">
<object id="..." type="...">
--- 54,106 ----
...
</objects></programlisting>
!
!
!
! <para>It is typically more convenient to install the schema in VS.NET,
! even for VS.NET 2005, as it makes the xml a little less verbose and you
! don't need to keep copying the XSD file for each project you create. For
! VS.NET 2003 the schema directory will be either</para>
!
!
!
! <para><literal>C:\Program Files\Microsoft Visual Studio .NET
! 2003\Common7\Packages\schemas\xml</literal> for VS.NET 2003</para>
!
!
!
<para>or</para>
!
!
!
! <para><literal>C:\Program Files\Microsoft Visual Studio
! .NET\Common7\Packages\schemas\xml</literal> for VS.NET 2002</para>
!
!
!
! <para>The VS.NET 2005 directory for XML schemas is</para>
!
!
!
<para>
! <literal>C:\Program Files\Microsoft Visual Studio
! 8\Xml\Schemas</literal>
</para>
+
+
+
+ <para>Spring's .xsd schemas are located in the directory doc/schema. In
+ that directory is also a NAnt build file to help copy over the .xsd files
+ to the appropriate VS.NET locations. To execute this scripte simply type
+ '<literal>nant</literal>' in the doc/schema directory.</para>
+
+
+
+ <para>Once you have registered the schema with VS.NET you can adding only
+ the namespace declaration to the objects element,</para>
+
+
+
<para>
! <programlisting><?xml version="1.0" encoding="UTF-8"?>
<objects xmlns="http://www.springframework.net">
<object id="..." type="...">
***************
*** 89,103 ****
</para>
! <para>
! Once registered, the namespace declaration alone is sufficient to get IntelliSense and validation of the
! configuration file from within VS.NET. Alternatively, you can select xsd file to use
! by setting the targetSchema property in the Property Sheet for the configuration file.
! </para>
! <para>
! As shown in the section <xref linkend="objects-factory-client"/>
! Spring.NET supports using .NET's application configuration file
! as the location to store the object defintions that will be managed by
! the object factory.
! </para>
<programlisting>
<configuration>
--- 114,134 ----
</para>
!
!
! <para>Once registered, the namespace declaration alone is sufficient to
! get IntelliSense and validation of the configuration file from within
! VS.NET. Alternatively, you can select xsd file to use by setting the
! targetSchema property in the Property Sheet for the configuration
! file.</para>
!
!
!
! <para>As shown in the section <xref linkend="objects-factory-client" />
! Spring.NET supports using .NET's application configuration file as the
! location to store the object defintions that will be managed by the object
! factory.</para>
!
!
!
<programlisting>
<configuration>
***************
*** 124,172 ****
</configuration>
</programlisting>
! <para>
! In this case VS.NET 2002/2003 will still provide you with IntelliSense help but
! you will not be able to fully validate the document as the entire
! schema for App.config is not known.
! To be able to validate this document one would need to install the
! <ulink url="http://www.radsoftware.com.au/articles/intellisensewebconfig.aspx">.NET Configuration File schema</ulink> and and addition schema that
! incorporates the <literal><spring></literal>
! and <literal><context></literal> section
! in addition to the <literal><objects></literal> would need to be
! created.
! </para>
! <para>
! Validating schema is a new feature in VS 2005 it is validating all the time while you
! edit, you will see any errors that it finds in the Error List window.
! </para>
! <para>
! Keep these tradeoffs in mind as you decide where to place the bulk of
! your configuration information. Conventional wisdom is do quick
! prototyping with App.config and use another IResource location,
! file or embedded assembly resource, for serious development.
! </para>
</sect1>
<sect1 id="vsnet-schema-versions">
<title>Versions of XML Schema</title>
! <para>
! The schema was updated from Spring 1.0.1 to 1.0.2 in order
! to support generics. The schema for version 1.0.1 is located under
! <literal>http://www.springframework.net/xsd/1.0.1/</literal>
! The schema for the latest version will always be located under
! <literal>http://www.springframework.net/xsd/</literal>
! </para>
</sect1>
<sect1 id="vsnet-api-help">
<title>Integrated API help</title>
- <para>As part of the installation process the API documentation
- for Spring.NET is registered with Visual Studio. There are
- two versions of the documentation, one for VS.NET 2002/2003
- and the other for VS.NET 2005. They differ only in the
- format applied, VS.NET 2005 using the sexy new format. Enjoy!
- </para>
- </sect1>
-
- </chapter>
-
-
-
--- 155,204 ----
</configuration>
</programlisting>
!
!
!
! <para>In this case VS.NET 2002/2003 will still provide you with
! IntelliSense help but you will not be able to fully validate the document
! as the entire schema for App.config is not known. To be able to validate
! this document one would need to install the <ulink
! url="http://www.radsoftware.com.au/articles/intellisensewebconfig.aspx">.NET
! Configuration File schema</ulink> and and addition schema that
! incorporates the <literal><spring></literal> and
! <literal><context></literal> section in addition to the
! <literal><objects></literal> would need to be created.</para>
!
!
!
! <para>Validating schema is a new feature in VS 2005 it is validating all
! the time while you edit, you will see any errors that it finds in the
! Error List window.</para>
!
!
!
! <para>Keep these tradeoffs in mind as you decide where to place the bulk
! of your configuration information. Conventional wisdom is do quick
! prototyping with App.config and use another IResource location, file or
! embedded assembly resource, for serious development.</para>
!
!
</sect1>
+
<sect1 id="vsnet-schema-versions">
<title>Versions of XML Schema</title>
!
! <para>The schema was updated from Spring 1.0.1 to 1.0.2 in order to
! support generics. The schema for version 1.0.1 is located under
! <literal>http://www.springframework.net/xsd/1.0.1/</literal> The schema
! for the latest version will always be located under
! <literal>http://www.springframework.net/xsd/</literal></para>
</sect1>
+
<sect1 id="vsnet-api-help">
<title>Integrated API help</title>
+ <para>Spring provides API documentation that can be integrated within
+ Visual Studio. There are two versions of the documentation, one for VS.NET
+ 2002/2003 and the other for VS.NET 2005. They differ only in the format
+ applied, VS.NET 2005 using the sexy new format. Enjoy!</para>
+ </sect1>
+ </chapter>
\ No newline at end of file
Index: web.xml
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/web.xml,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** web.xml 14 Dec 2007 18:05:10 -0000 1.31
--- web.xml 20 Dec 2007 16:33:52 -0000 1.32
***************
*** 1521,1524 ****
--- 1521,1607 ----
</note>
</sect2>
+
+ <sect2>
+ <title>Using DataBindingPanel</title>
+
+ <para>To simplify use of Spring's Data Binding feature on web pages and
+ controls, Spring.Web provides a special DataBindingPanel container
+ control. A DataBindingPanel does not render any html code itself, but
+ allows for specifiying additional, data binding related attributes to
+ its child controls:</para>
+
+ <para><programlisting><%@ Page Language="C#" CodeFile="Default.aspx.cs" Inherits="DataBinding_EasyEmployeeInfo_Default" %>
+ <%@ Register TagPrefix="spring" Namespace="Spring.Web.UI.Controls" Assembly="Spring.Web" %>
+ <html>
+ <body>
+ <spring:DataBindingPanel ID="ctlDataBindingPanel" runat="server">
+ <table cellpadding="3" cellspacing="3" border="0">
+ <tr>
+ <td>Employee ID:</td>
+ <td>
+ <asp:TextBox ID="txtId" runat="server" BindingTarget="Employee.Id" />
+ </td>
+ </tr>
+ <tr>
+ <td>First Name:</td>
+ <td><asp:TextBox ID="txtFirstName" runat="server" BindingTarget="Employee.FirstName" /></td>
+ </tr>
+ </table>
+ </spring.DataBindingPanel>
+ </body>
+ </html></programlisting></para>
+
+ <para>Using DataBindingPanel the binding information can be specified
+ directly on the control declaration. The following attributes are
+ recognized by a DataBindingPanel:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>BindingTarget</para>
+
+ <para>corresponds to the target expression used in
+ IBindingContainer.AddBinding()</para>
+ </listitem>
+
+ <listitem>
+ <para>BindingSource</para>
+
+ <para>corresponds to the source expression used in
+ IBindingContainer.AddBinding(). For standard controls you don't need
+ to specify the source expression. If you are binding to some custom
+ control, of course you must specifiy this attribute.</para>
+ </listitem>
+
+ <listitem>
+ <para>BindingDirection</para>
+
+ <para>one of the values of the BindingDirection enumeration</para>
+ </listitem>
+
+ <listitem>
+ <para>BindingFormatter</para>
+
+ <para>if you need a custom formatter, you can specifiy the object
+ name of a formatter here. The formatter instance will be obtained by
+ a call to IApplicationContext.GetObject() each time it is
+ needed.</para>
+ </listitem>
+
+ <listitem>
+ <para>BindingType</para>
+
+ <para>In case you need a completely customized binding, specify its
+ type here. Note that a custom binding type must implement the
+ following constructor signature:</para>
+
+ <para><literal>ctor(string source,string target, BindingDirection,
+ IFormatter)</literal></para>
+ </listitem>
+ </itemizedlist>
+
+ <note>
+ The Visual Studio Web Form Editor will of course complain about binding attributes because it doesn't know them. You can safely ignore those warnings.
+ </note>
+ </sect2>
</sect1>
Index: objects.xml
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/objects.xml,v
retrieving revision 1.113
retrieving revision 1.114
diff -C2 -d -r1.113 -r1.114
*** objects.xml 7 Dec 2007 20:31:59 -0000 1.113
--- objects.xml 20 Dec 2007 16:33:52 -0000 1.114
***************
*** 196,200 ****
the Spring.Core.Tests.build file included the distribution. </note> The
<classname>IResource</classname> abstraction is explained further in
! <xref linkend="objects-iresource" />. </para>
<para>The preferred way to create an
--- 196,200 ----
the Spring.Core.Tests.build file included the distribution. </note> The
<classname>IResource</classname> abstraction is explained further in
! <xref linkend="objects-iresource" />.</para>
<para>The preferred way to create an
***************
*** 269,275 ****
providing validation (and Intellisense support in the case of
VisualStudio.NET). You may wish to refer to <xref linkend="vsnet" /> for
! more information regarding such integration. You can also obtain the XSD
! that supports the latest release from the web at <ulink
! url="http://www.springframework.net/xsd/spring-objects.xsd">spring-objects.xsd</ulink>.</para>
<para>Your XML object definitions can also be defined within the
--- 269,273 ----
providing validation (and Intellisense support in the case of
VisualStudio.NET). You may wish to refer to <xref linkend="vsnet" /> for
! more information regarding such integration.</para>
<para>Your XML object definitions can also be defined within the
***************
*** 321,325 ****
context constructor which takes multiple resource locations. With an
object factory, an object definition reader can be used multiple times
! to read definitions from each file in turn. </para>
<para>Generally, the Spring.NET team prefers the above approach,
--- 319,323 ----
context constructor which takes multiple resource locations. With an
object factory, an object definition reader can be used multiple times
! to read definitions from each file in turn.</para>
<para>Generally, the Spring.NET team prefers the above approach,
***************
*** 1416,1425 ****
demonstrates this behaviour...</para>
! <programlisting><object type="Examples.ExampleObject,
! ExamplesLibrary"> <property
! name="email"><value></value></property>
! <!-- equivalent, using value attribute as opposed to nested
! <value/> element... <property name="email"
! value=""/> </object></programlisting>
<para>This results in the email property being set to the empty string
--- 1414,1423 ----
demonstrates this behaviour...</para>
! <programlisting><object type="Examples.ExampleObject, ExamplesLibrary">
! <property name="email"><value></value></property>
!
! <!-- equivalent, using value attribute as opposed to nested <value/> element...
! <property name="email" value=""/>
! </object></programlisting>
<para>This results in the email property being set to the empty string
***************
*** 1429,1436 ****
indicate a <literal>null</literal> value; to wit...</para>
! <programlisting><object type="Examples.ExampleObject,
! ExamplesLibrary"> <property
! name="email"><null/></property>
! </object></programlisting>
<para>This results in the email property being set to
--- 1427,1433 ----
indicate a <literal>null</literal> value; to wit...</para>
! <programlisting><object type="Examples.ExampleObject, ExamplesLibrary">
! <property name="email"><null/></property>
! </object></programlisting>
<para>This results in the email property being set to
Index: ajax.xml
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/ajax.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** ajax.xml 28 Jun 2007 14:42:34 -0000 1.5
--- ajax.xml 20 Dec 2007 16:33:52 -0000 1.6
***************
*** 131,139 ****
<para>You can find a full Web.config file in the example that comes with
! this integration. (see <xref linkend="quickstarts" />)</para>
</sect2>
<sect2 id="callingWebServices">
! <title>Calling Web Services by using JavaScript</title>
<para>A proxy class is generated for each Web Service. Calls to Web
--- 131,139 ----
<para>You can find a full Web.config file in the example that comes with
! this integration. </para>
</sect2>
<sect2 id="callingWebServices">
! <title>alling Web Services by using JavaScript</title>
<para>A proxy class is generated for each Web Service. Calls to Web
|