[Springnet-commits] Spring.Net/doc/reference/src web.xml, 1.25, 1.26
Brought to you by:
aseovic,
markpollack
From: Mark P. <mar...@us...> - 2007-11-15 20:25:14
|
Update of /cvsroot/springnet/Spring.Net/doc/reference/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv18762 Modified Files: web.xml Log Message: SPRNET-708 - Remove "UniqueID" based usercontrol DI sample from web reference docs Index: web.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/web.xml,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** web.xml 10 Oct 2007 03:03:28 -0000 1.25 --- web.xml 15 Nov 2007 20:25:11 -0000 1.26 *************** *** 42,46 **** framework and much of that experience and added value can be transliterated to help developers be more productive when using .NET ! upcoming MVC support. </para> <para>As we said earlier, event handlers in code-behind classes really --- 42,46 ---- framework and much of that experience and added value can be transliterated to help developers be more productive when using .NET ! upcoming MVC support.</para> <para>As we said earlier, event handlers in code-behind classes really *************** *** 488,500 **** <para>Spring.Web also allows application developers to inject dependencies into controls (both user controls and standard controls) ! that are contained within a page. This can be accomplished in two ways - ! either globally for all the controls of a particular ! <classname>Type</classname>, or locally, for a specific control within a ! page.</para> ! ! <para>In order to inject dependencies globally, the location of the ! <literal>.ascx</literal> control needs to be used as the object type ! identifier. This is similar to injecting into <literal>.aspx</literal> ! pages shown above:</para> <programlisting><object type="~/controls/MyControl.ascx" abstract="true"> --- 488,496 ---- <para>Spring.Web also allows application developers to inject dependencies into controls (both user controls and standard controls) ! that are contained within a page. This can be accomplished globally for ! all controls of a particular <literal>Type</literal> by using the ! location of the <literal>.ascx</literal> as the object type identifier. ! This is similar to injecting into <literal>.aspx </literal>pages shown ! above.</para> <programlisting><object type="~/controls/MyControl.ascx" abstract="true"> *************** *** 502,532 **** </object></programlisting> - <para>In order to inject dependencies locally, the control's - <literal>UniqueID</literal> needs to used as the object definition - identifier:</para> - - <programlisting><object id="myContainerControl:myTargetControl" abstract="true"> - <!-- inject dependencies here... --> - </object></programlisting> - <para>In either case, be sure to mark the object definition as <literal>abstract</literal> (by adding <literal>abstract="true"</literal> to the attribute list of the <literal><object/></literal> element).</para> - - <para>The easiest way to obtain a control's <literal>UniqueID</literal> - is by turning tracing on for the application and looking for the - <literal>UniqueID</literal> in the control hierarchy section of the - resulting page trace. Yes, this is... unfortunate.</para> - - <para>Please note that both global and local definitions for the same - control can be specified, in which case the resulting definitions will - be merged, with values from the local definition overriding values from - the global definition as necessary. Due to context scoping issues, you - will probably want to define global control definitions in the root - context so that dependencies are injected consistently throughout the - web application. In contrast, local control definitions are better - defined within the child context for the component, in order to avoid - naming conflicts between different components.</para> </sect2> --- 498,505 ---- *************** *** 555,570 **** HttpApplicationConfigurer' ModuleTemplates property.</para> ! <programlisting> <object name="HttpApplicationConfigurer" type="Spring.Context.Support.HttpApplicationConfigurer, Spring.Web"> ! <property name="ModuleTemplates"> ! <dictionary> ! <entry key="HtmlCommentAppender"> <!-- this name must match the module name --> ! <object> ! <!-- select "view source" in your browser on any page to see the appended html comment --> ! <property name="AppendText" value="My configured comment!" /> ! </object> ! </entry> ! </dictionary> ! </property> ! </object></programlisting> <para>You can see this example in action in the Web Quickstart.</para> --- 528,543 ---- HttpApplicationConfigurer' ModuleTemplates property.</para> ! <programlisting><object name="HttpApplicationConfigurer" type="Spring.Context.Support.HttpApplicationConfigurer, Spring.Web"> ! <property name="ModuleTemplates"> ! <dictionary> ! <entry key="HtmlCommentAppender"> <!-- this name must match the module name --> ! <object> ! <!-- select "view source" in your browser on any page to see the appended html comment --> ! <property name="AppendText" value="My configured comment!" /> ! </object> ! </entry> ! </dictionary> ! </property> ! </object></programlisting> <para>You can see this example in action in the Web Quickstart.</para> |