[seam-commits] Seam SVN: r13557 - modules/xml/trunk/docs/src/main/docbook/en-US.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Thu Aug 5 07:44:54 EDT 2010


Author: swd847
Date: 2010-08-05 07:44:53 -0400 (Thu, 05 Aug 2010)
New Revision: 13557

Modified:
   modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml
Log:
update seam-xml docs to cover inline beans and el



Modified: modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml
===================================================================
--- modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml	2010-08-05 11:18:31 UTC (rev 13556)
+++ modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml	2010-08-05 11:44:53 UTC (rev 13557)
@@ -278,8 +278,53 @@
         <para>Type conversion is done automatically for all primitives and primitive wrappers, <literal>Date</literal>, 
         <literal>Calendar</literal>,<literal>Enum</literal> and <literal>Class</literal> fields. 
         In this instance <literal>ArrayFieldValue.carray</literal> is actually an array of classes, not an array of Strings.</para>
+        <para>The use of EL to set field values is also supported:</para>
+        <programlisting role="XML">
+            <![CDATA[   
+<m:Report>
+   <m:name>#{reportName}</m:name>
+   <m:parameters>
+      <s:key>#{paramName}</s:key>
+      <s:value>#{paramValue}</s:key>
+   </m:parameters>
+</m:Report>
+]]>
+</programlisting>
     </section>
     <section>
+      <title>Inline Bean Declarations</title>
+      <para>Inline beans allow you to set field values to another bean that is declared inline inside the field declaration.
+      This allows for the configuration of complex types with nestled classes. Inline beans can be declared inside both
+      <literal>&lt;s:value&gt;</literal> and <literal>&lt;s:key&gt;</literal> elements, and may be used in both collections 
+      and simple field values. Inline beans must not have any qualifier annotations declared on the bean, instead seam-xml assigns 
+      them an artificial qualifier. Inline beans may have any scope, however the default <literal>Dependent</literal> scope is 
+      recomended.
+      </para>
+<programlisting role="XML">
+<![CDATA[         
+<test:Knight>
+  <test:sword>
+     <value>
+        <test:Sword type="sharp"/>
+     </value>
+  </test:sword>
+  <test:horse>
+     <value>
+        <test:Horse>
+           <test:name>
+              <value>billy</value>
+           </test:name>
+           <test:shoe>
+              <Inject/>
+           </test:shoe>
+        </test:Horse>
+     </value>
+  </test:horse>
+</test:Knight>      
+]]>
+</programlisting>      
+    </section>
+    <section>
         <title>Configuring methods</title>
     
         <para>It is also possible to configure methods in a similar way to configuring fields:</para>



More information about the seam-commits mailing list