Update of /cvsroot/springnet/Spring.Net/doc/reference/src
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv1001
Modified Files:
testing.xml transaction.xml validation.xml web.xml
Log Message:
SPRNET-875 - Documentation incorrectly lists Unspecified as default isolation level, should be ReadCommitted.
other misc doc changes
Index: validation.xml
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/validation.xml,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** validation.xml 16 Jan 2008 17:21:44 -0000 1.18
--- validation.xml 17 Feb 2008 13:19:51 -0000 1.19
***************
*** 69,74 ****
<para>Decoupling validation from presentation was the major goal that
! significantly influenced design of the validation framework. Basically, we
! wanted to be able to define a set of validation rules that are completely
independent from the presentation so we can reuse them (or at least have
the ability to reuse them) in different application layers. This meant
--- 69,74 ----
<para>Decoupling validation from presentation was the major goal that
! significantly influenced design of the validation framework. We wanted to
! be able to define a set of validation rules that are completely
independent from the presentation so we can reuse them (or at least have
the ability to reuse them) in different application layers. This meant
***************
*** 648,652 ****
<div style="text-align: center">
<h4><asp:Label ID="caption" runat="server"></asp:Label></h4>
! <spring:ValidationSummary ID="validationSummary" runat="server" />
<table>
<tr class="formLabel">
--- 648,652 ----
<div style="text-align: center">
<h4><asp:Label ID="caption" runat="server"></asp:Label></h4>
! <emphasis role="bold"><spring:ValidationSummary ID="validationSummary" runat="server" /></emphasis>
<table>
<tr class="formLabel">
***************
*** 664,668 ****
<td nowrap="nowrap">
<anthem:DropDownList ID="leavingFromAirportCode" AutoCallBack="true" runat="server" />
! <spring:ValidationError id="departureAirportErrors" runat="server" />
</td>
<td class="formLabel" align="right">
--- 664,668 ----
<td nowrap="nowrap">
<anthem:DropDownList ID="leavingFromAirportCode" AutoCallBack="true" runat="server" />
! <emphasis role="bold"><spring:ValidationError id="departureAirportErrors" runat="server" /></emphasis>
</td>
<td class="formLabel" align="right">
***************
*** 670,674 ****
<td nowrap="nowrap">
<anthem:DropDownList ID="goingToAirportCode" AutoCallBack="true" runat="server" />
! <spring:ValidationError id="destinationAirportErrors" runat="server" />
</td>
</tr>
--- 670,674 ----
<td nowrap="nowrap">
<anthem:DropDownList ID="goingToAirportCode" AutoCallBack="true" runat="server" />
! <emphasis role="bold"><spring:ValidationError id="destinationAirportErrors" runat="server" /></emphasis>
</td>
</tr>
***************
*** 678,682 ****
<td nowrap="nowrap">
<spring:Calendar ID="leavingFromDate" runat="server" Width="75px" AllowEditing="true" Skin="system" />
! <spring:ValidationError id="departureDateErrors" runat="server" />
</td>
<td class="formLabel" align="right">
--- 678,682 ----
<td nowrap="nowrap">
<spring:Calendar ID="leavingFromDate" runat="server" Width="75px" AllowEditing="true" Skin="system" />
! <emphasis role="bold"><spring:ValidationError id="departureDateErrors" runat="server" /></emphasis>
</td>
<td class="formLabel" align="right">
***************
*** 685,689 ****
<div id="returningOnCalendar">
<spring:Calendar ID="returningOnDate" runat="server" Width="75px" AllowEditing="true" Skin="system" />
! <spring:ValidationError id="returnDateErrors" runat="server" />
</div>
</td>
--- 685,689 ----
<div id="returningOnCalendar">
<spring:Calendar ID="returningOnDate" runat="server" Width="75px" AllowEditing="true" Skin="system" />
! <emphasis role="bold"><spring:ValidationError id="returnDateErrors" runat="server" /></emphasis>
</div>
</td>
Index: testing.xml
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/testing.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** testing.xml 16 Jan 2008 17:21:44 -0000 1.5
--- testing.xml 17 Feb 2008 13:19:51 -0000 1.6
***************
*** 67,84 ****
<note>
<para>The Spring.Testing.NUnit.dll library is compiled against NUnit
! 2.4.1. At the time of this writing the latest version of NUnit is 2.4.3.
! ReSharper (which uses 2.2.8 internally) TestDriven.NET will handle these
! differences appropriately and you will be able to use these tools for
! Spring based NUnit testing in the IDE. If you are using the GUI-runner
! that comes with NUnit then you should add the following to your .config
! file, (in the form of MyAssembly.dll.config)</para>
! <programlisting><dependentAssembly>
! <assemblyIdentity name="nunit.framework"
! publicKeyToken="96d09a1eb7f44a77"
! culture="neutral"/>
! <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535"
! newVersion="2.4.3.0"/>
! </dependentAssembly></programlisting>
</note>
--- 67,92 ----
<note>
<para>The Spring.Testing.NUnit.dll library is compiled against NUnit
! 2.4.1. At the time of this writing the latest version of NUnit is 2.4.6.
! Note that add-in have their own versions of NUnit they use. For example,
! ReSharper 3.0 uses 2.2.8. If you are using the GUI-runner that comes
! with NUnit then you should add the following to your .config file, (in
! the form of MyAssembly.dll.config)</para>
! <programlisting><runtime>
!
! <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
!
! <dependentAssembly>
! <assemblyIdentity name="nunit.framework"
! publicKeyToken="96d09a1eb7f44a77"
! culture="neutral"/>
! <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535
! newVersion="2.4.6.0"/>
!
! </dependentAssembly>
!
! </assemblyBinding>
!
! </runtime></programlisting>
</note>
Index: web.xml
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/web.xml,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** web.xml 16 Jan 2008 19:44:25 -0000 1.35
--- web.xml 17 Feb 2008 13:19:51 -0000 1.36
***************
*** 87,92 ****
<para>Spring.Web also adds support for applying the dependency injection
! principle to one's ASP.NET <classname>Page</classname>s and
! <classname>Control</classname>s as well as http modules and custom
provider modules. This means that application developers can easily inject
service dependencies into web controllers by leveraging the power of the
--- 87,92 ----
<para>Spring.Web also adds support for applying the dependency injection
! principle to one's ASP.NET <classname>Pages</classname> and
! <classname>Controls</classname> as well as http modules and custom
provider modules. This means that application developers can easily inject
service dependencies into web controllers by leveraging the power of the
***************
*** 112,116 ****
specific base classes such as <classname>Spring.Web.UI.Page</classname>;
however, some very powerful features such as dependency injection for
! ASP.NET <classname>Page</classname>s can be leveraged without having to
extend Spring.Web-specific base classes. It is worth stating that by
taking advantage of <emphasis>some</emphasis> of the more useful features
--- 112,116 ----
specific base classes such as <classname>Spring.Web.UI.Page</classname>;
however, some very powerful features such as dependency injection for
! ASP.NET Pages, Controls, and providers can be leveraged without having to
extend Spring.Web-specific base classes. It is worth stating that by
taking advantage of <emphasis>some</emphasis> of the more useful features
***************
*** 370,374 ****
configuration file.</para>
! <para>Needless to say, you can (and should) avoid the need to specify
<literal><configSections/></literal> element by moving the
configuration handler definition for the
--- 370,374 ----
configuration file.</para>
! <para>You can (and should) avoid the need to specify
<literal><configSections/></literal> element by moving the
configuration handler definition for the
***************
*** 1081,1095 ****
false</literal>), the <literal>InitializeModel</literal> method is
called which initializes the trip object by creating a new instance
! and setting its properties to desired values. Right before page is
! rendered, <literal>SaveModel</literal> method will be invoked and
! whatever the value it returns will be stored within HTTP Session.
! Finally, on each postback, <literal>LoadModel</literal> method will
! be called and the value returned by the previous call to
<literal>SaveModel</literal> will be passed to it as an
argument.</para>
! <para>In this particular case the implementation is very simple:
! because our whole model is just the <literal>trip</literal> object,
! <literal>SaveModel</literal> simply returns the
<literal>trip</literal> object and <literal>LoadModel</literal>
casts the <literal>savedModel</literal> argument to
--- 1081,1095 ----
false</literal>), the <literal>InitializeModel</literal> method is
called which initializes the trip object by creating a new instance
! and setting its properties to desired values. Right before the page
! is rendered, <literal>the SaveModel</literal> method will be invoked
! and whatever the value it returns will be stored within the HTTP
! Session. Finally, on each postback, <literal>the LoadModel</literal>
! method will be called and the value returned by the previous call to
<literal>SaveModel</literal> will be passed to it as an
argument.</para>
! <para>In this particular case the implementation is very simple
! because our whole model is just the <literal>trip</literal> object.
! As such, <literal>SaveModel</literal> simply returns the
<literal>trip</literal> object and <literal>LoadModel</literal>
casts the <literal>savedModel</literal> argument to
***************
*** 1120,1133 ****
always the case when you are setting a bi-directional binding, as
both binding expressions need to be "settable". What is important to
! remember about <literal>InitializeDataBindings</literal> method
! (other than the fact that you should configure your data binding
! rules there, of course ;-), is that it is executed only once
! <emphasis>per page type</emphasis>. Basically, all of the binding
! expressions are parsed the first time the page is instantiated, and
! are the cached and used by all instances of that same page type that
! are created at a later time. This is done for performance reasons,
! as data binding expression parsing on every postback is unnecessary
! and would add a significant overhead to the overall page processing
! time.</para>
</listitem>
--- 1120,1131 ----
always the case when you are setting a bi-directional binding, as
both binding expressions need to be "settable". What is important to
! remember about <literal>InitializeDataBindings</literal> method is
! that it is executed only once <emphasis>per page type</emphasis>.
! Basically, all of the binding expressions are parsed the first time
! the page is instantiated, and are the cached and used by all
! instances of that same page type that are created at a later time.
! This is done for performance reasons, as data binding expression
! parsing on every postback is unnecessary and would add a significant
! overhead to the overall page processing time.</para>
</listitem>
***************
*** 1135,1143 ****
<para>If you look at the SearchForFlights event handler, you will
notice that it has no dependencies on the view elements. It simply
! uses injected bookingAgent service and a trip object UI controls
! were previously bound to in order to obtain a list of suggested
! flights. Furthermore, if you make any modifications to the trip
! object within your event handler, bound controls will be updated
! accordingly just before the page is rendered.</para>
<para>This accomplishes one of the major goals we set out to
--- 1133,1141 ----
<para>If you look at the SearchForFlights event handler, you will
notice that it has no dependencies on the view elements. It simply
! uses the injected bookingAgent service and a trip object that in
! order to obtain a list of suggested flights. Furthermore, if you
! make any modifications to the trip object within your event handler,
! bound controls will be updated accordingly just before the page is
! rendered.</para>
<para>This accomplishes one of the major goals we set out to
***************
*** 1148,1154 ****
</orderedlist></para>
! <para>Now that you have a solid high-level picture and know how Spring.NET
! data binding and model management are typically used in web applications,
! let's take a look at the details and see how data binding is actually
implemented under the hood, what the extension points are, and what are
some additional features that make data binding framework usable in
--- 1146,1152 ----
</orderedlist></para>
! <para>Now that you have a solid high-level picture of how Spring.NET data
! binding and model management are typically used in web applications, let's
! take a look at the details and see how data binding is actually
implemented under the hood, what the extension points are, and what are
some additional features that make data binding framework usable in
***************
*** 1167,1174 ****
{
void BindSourceToTarget(object source, object target, ValidationErrors validationErrors);
! void BindSourceToTarget(object source, object target, ValidationErrors validationErrors, IDictionary variables);
void BindTargetToSource(object source, object target, ValidationErrors validationErrors);
! void BindTargetToSource(object source, object target, ValidationErrors validationErrors, IDictionary variables);
void SetErrorMessage(string messageId, params string[] errorProviders);
--- 1165,1176 ----
{
void BindSourceToTarget(object source, object target, ValidationErrors validationErrors);
!
! void BindSourceToTarget(object source, object target, ValidationErrors validationErrors,
! IDictionary variables);
void BindTargetToSource(object source, object target, ValidationErrors validationErrors);
!
! void BindTargetToSource(object source, object target, ValidationErrors validationErrors,
! IDictionary variables);
void SetErrorMessage(string messageId, params string[] errorProviders);
***************
*** 1185,1190 ****
explanation. While the data binding framework is not in any way coupled
to the data validation framework, they are in some ways related. For
! example, while data validation framework is best suited to validate the
! populated model according to the business rules, the data binding
framework is in a better position to validate data types during the
binding process. However, regardless of where specific validation is
--- 1187,1192 ----
explanation. While the data binding framework is not in any way coupled
to the data validation framework, they are in some ways related. For
! example, while the data validation framework is best suited to validate
! the populated model according to the business rules, the data binding
framework is in a better position to validate data types during the
binding process. However, regardless of where specific validation is
***************
*** 1208,1226 ****
members:<programlisting>public interface IBindingContainer : IBinding
{
! bool HasBindings { get; }
! IBinding AddBinding(IBinding binding);
! IBinding AddBinding(string sourceExpression, string targetExpression);
! IBinding AddBinding(string sourceExpression, string targetExpression, BindingDirection direction);
! IBinding AddBinding(string sourceExpression, string targetExpression, IFormatter formatter);
! IBinding AddBinding(string sourceExpression, string targetExpression, BindingDirection direction, IFormatter formatter);
}</programlisting>As you can see, this interface has a number of overloaded
<literal>AddBinding</literal> methods. The first one,
<literal>AddBinding(IBinding binding)</literal> is the most generic one,
as it can be used to add any binding type to the container. The other
! four are really convenience methods that provide a simple way to add the
! most commonly used binding type,
! <literal>SimpleExpressionBinding</literal>. The
! <literal>SimpleExpressionBinding</literal> is what we used in the
example at the beginning of this section to bind our web form to a
<classname>Trip</classname> instance. It uses Spring.NET Expression
--- 1210,1228 ----
members:<programlisting>public interface IBindingContainer : IBinding
{
! bool HasBindings { get; }
! IBinding AddBinding(IBinding binding);
! IBinding AddBinding(string sourceExpression, string targetExpression);
! IBinding AddBinding(string sourceExpression, string targetExpression, BindingDirection direction);
! IBinding AddBinding(string sourceExpression, string targetExpression, IFormatter formatter);
! IBinding AddBinding(string sourceExpression, string targetExpression, BindingDirection direction,
! IFormatter formatter);
}</programlisting>As you can see, this interface has a number of overloaded
<literal>AddBinding</literal> methods. The first one,
<literal>AddBinding(IBinding binding)</literal> is the most generic one,
as it can be used to add any binding type to the container. The other
! four are convenience methods that provide a simple way to add the most
! commonly used binding type, <literal>SimpleExpressionBinding</literal>.
! The <literal>SimpleExpressionBinding</literal> is what we used in the
example at the beginning of this section to bind our web form to a
<classname>Trip</classname> instance. It uses Spring.NET Expression
***************
*** 1235,1239 ****
<para>The direction argument determines whether the binding is
bidirectional or unidirectional. By default, all data bindings are
! bidirectional unless direction argument is set to either
<literal>BindingDirection.SourceToTarget</literal> or
<literal>BindingDirection.TargetToSource</literal>. If one of these
--- 1237,1241 ----
<para>The direction argument determines whether the binding is
bidirectional or unidirectional. By default, all data bindings are
! bidirectional unless the direction argument is set to either
<literal>BindingDirection.SourceToTarget</literal> or
<literal>BindingDirection.TargetToSource</literal>. If one of these
***************
*** 1450,1455 ****
of strings that specify the collection of error providers message
where the message should be displayed. In the above case the error
! provider will be rendered in Spring's ValidationError User
! Control.</para>
</sect3>
--- 1452,1457 ----
of strings that specify the collection of error providers message
where the message should be displayed. In the above case the error
! provider will be rendered in Spring's ValidationError User Control.
! See</para>
</sect3>
***************
*** 2129,2134 ****
<dictionary>
<entry key="literal" value="My Text"/>
! <entry key="name" value="${UserInfo.FullName}"/>
! <entry key="host" value="${Request.UserHostName}"/>
</dictionary>
</property>
--- 2131,2136 ----
<dictionary>
<entry key="literal" value="My Text"/>
! <entry key="name" value="%{UserInfo.FullName}"/>
! <entry key="host" value="%{Request.UserHostName}"/>
</dictionary>
</property>
***************
*** 2156,2170 ****
for each and every result is the <literal>TargetPage</literal> property.
The value of the <literal>Mode</literal> property can be either
! <literal>Transfer</literal> or <literal>Redirect</literal>, and defaults
! to <literal>Transfer</literal> if none is specified.</para>
<para>If one's target page requires parameters, one can define them using
the <literal>Parameters</literal> dictionary property. One simply
! specifies either literal values or object navigation expressions for such
! parameter values; if one specifies an expression, this expression will be
! evaluated in the context of the page in which the result is being
! referenced... in the specific case of the above example, this means that
! any page that uses the <literal>homePageResult</literal> needs to expose a
! <classname>UserInfo</classname> property on the page class itself.</para>
<para>Parameters will be handled differently depending on the result mode.
--- 2158,2187 ----
for each and every result is the <literal>TargetPage</literal> property.
The value of the <literal>Mode</literal> property can be either
! <literal>Transfer</literal>, <literal>TransferNoPreserve</literal>,
! <literal>Redirect</literal>, and defaults to <literal>Transfer</literal>
! if none is specified. TransferNoPreserve issues a server-side transfer
! with 'preserveForm=false', so that QueryString and Form data are not
! preserved. </para>
<para>If one's target page requires parameters, one can define them using
the <literal>Parameters</literal> dictionary property. One simply
! specifies either literal values or <link linkend="navigation">object
! navigation expressions</link> for such parameter values; if one specifies
! an expression, this expression will be evaluated in the context of the
! page in which the result is being referenced... in the specific case of
! the above example, this means that any page that uses the
! <literal>homePageResult</literal> needs to expose a
! <classname>UserInfo</classname> property on the page class itself.<note>
! <para>In Spring 1.1.0 and before the prefix used to indicate an object
! navigation expression in the <literal>Parameters</literal> dictionary
! property was the dollar sign, i.e.
! <literal>${UserInfo.FullName}.</literal>This conflicted with the
! prefix used to perform property replacement, the dollar sign, as
! described in the section <link
! linkend="objects-factory-placeholderconfigurer">PropertyPlaceholderConfigurer</link>.
! The prefix that should be used in the <literal>Parameters</literal>
! dictionary to avoid this conflict is the percent sign, i.e.
! <literal>%{UserInfo.FullName}</literal>.</para>
! </note></para>
<para>Parameters will be handled differently depending on the result mode.
***************
*** 2188,2200 ****
<programlisting>
<object type="~/UI/Forms/UserRegistration.aspx" parent="basePage">
! <property name="UserManager">
! <ref object="userManager"/>
! </property>
! <property name="Results">
! <dictionary>
! <entry key="userSaved" value="redirect:UserRegistered.aspx?status=Registration Successful,user=${UserInfo}"/>
! <entry key="cancel" value-ref="homePageResult"/>
! </dictionary>
! </property>
</object>
</programlisting>
--- 2205,2218 ----
<programlisting>
<object type="~/UI/Forms/UserRegistration.aspx" parent="basePage">
! <property name="UserManager">
! <ref object="userManager"/>
! </property>
!
! <property name="Results">
! <dictionary>
! <entry key="userSaved" value="redirect:UserRegistered.aspx?status=Registration Successful,user=${UserInfo}"/>
! <entry key="cancel" value-ref="homePageResult"/>
! </dictionary>
! </property>
</object>
</programlisting>
***************
*** 2358,2360 ****
--- 2376,2385 ----
</sect2>
</sect1>
+
+ <sect1>
+ <title>Spring User Controls</title>
+
+ <para>Spring provides several custom user controls such as those used to
+ render errors that occur during databinding.</para>
+ </sect1>
</chapter>
\ No newline at end of file
Index: transaction.xml
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/transaction.xml,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** transaction.xml 25 Jan 2008 17:34:11 -0000 1.26
--- transaction.xml 17 Feb 2008 13:19:51 -0000 1.27
***************
*** 1096,1100 ****
<listitem>
! <para>The isolation level is IsolationLevel.Unspecified</para>
</listitem>
--- 1096,1100 ----
<listitem>
! <para>The isolation level is IsolationLevel.ReadCommitted</para>
</listitem>
***************
*** 1175,1179 ****
<entry>No</entry>
! <entry>Unspecified</entry>
<entry>The transaction isolation level</entry>
--- 1175,1179 ----
<entry>No</entry>
! <entry>ReadCommitted</entry>
<entry>The transaction isolation level</entry>
***************
*** 1254,1258 ****
<listitem>
! <para>The isolation level is IsolationLevel.Unspecified</para>
</listitem>
--- 1254,1258 ----
<listitem>
! <para>The isolation level is IsolationLevel.ReadCommitted</para>
</listitem>
|