From seam-commits at lists.jboss.org Thu Oct 14 07:20:03 2010 Content-Type: multipart/mixed; boundary="===============7541218212148260329==" MIME-Version: 1.0 From: seam-commits at lists.jboss.org To: seam-commits at lists.jboss.org Subject: [seam-commits] Seam SVN: r13857 - modules/xml/trunk/docs/src/main/docbook/en-US. Date: Thu, 14 Oct 2010 07:20:03 -0400 Message-ID: <201010141120.o9EBK3j6015800@svn01.web.mwc.hst.phx2.redhat.com> --===============7541218212148260329== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: swd847 Date: 2010-10-14 07:20:03 -0400 (Thu, 14 Oct 2010) New Revision: 13857 Modified: modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml Log: minor doc changes Modified: modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml 2010-10-1= 4 11:19:10 UTC (rev 13856) +++ modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml 2010-10-1= 4 11:20:03 UTC (rev 13857) @@ -68,8 +68,8 @@ = = - For example, say you had a class com.mydomain.package2= .Report. = - To configure a Report bean you would use = + For example, say you had a class com.mydomain.package2.Re= port. = + To configure a Report bean you would use = <ns:Report>. Methods and fields on the= bean are resolved from the same namespace as the bean itself. It is possible to d= istinguish between = overloaded methods by specifying the parameter types, for more = information see @@ -83,7 +83,7 @@ Adding, replacing and modifying beans = - By configuring a bean via XML creates a new bean, however there = + By default configuring a bean via XML creates a new bean, however= there = may be cases where you want to modify an existing bean rather than adding a new one. The <s:replaces> and = <s:modifies> tags allow you to do this. @@ -93,20 +93,21 @@ The <s:replaces> tag prevents the existi= ng bean from being = installed, and registers a new one with the given configuration. = The = <s:modifies> tag does the same, except t= hat it merges - the annotations on the bean with the annotations defined in XML. = This has almost - the same effect as modifiying an existing bean, except it is poss= ible to install = - multiple beans that modify the same class. + the annotations on the bean with the annotations defined in XML. = Where the + same annotation is specified on both the class and in XML the ann= otation in + XML takes precidence. This has almost the same effect as modifiyi= ng an existing = + bean, except it is possible to install multiple beans that modify= the same class. = - + - - + + = - + - -]]> + +]]> = The first entry above adds a new bean with an extra qualifier, in= addition = @@ -126,7 +127,7 @@ = Annotations are resolved in the same way as normal classes. Conce= ptually = - annotations are applied to the object their parent element in the= resolves + annotations are applied to the object their parent element resolv= es to. It is possible to set the value of annotation members using t= he xml attribute that corresponds to the member name. For example: = @@ -138,13 +139,12 @@ }]]> = - A - + A + = - -]]> +]]> = The value member can be set using the inner text of = the node, as seen = @@ -213,43 +213,43 @@ Collection field values. Some examples: = - + = - + 1 2 - + = - + java.lang.Integer java.lang.Long - + = - + hello world - + = - + = - + = - + 1hello 2world - + = - + 1java.lang.Integer 2java.lang.Long - + = -]]> +]]> = - Type conversion is done automatically for all primitives and p= rimitive wrappers, Date, = - Calendar,Enum and Class fields. = - In this instance ArrayFieldValue.carray is = actually an array of classes, not an array of Strings. + Type conversion is done automatically for all primitives and p= rimitive wrappers, = + Date, Calendar,= Enum and = + Class fields. = = @@ -263,6 +263,13 @@ #{paramValue} ]]> + + + Internally field values are set by wrapping the Injectio= nTarget = + for a bean. This means that the expressions are evaluated once= , at bean = + creation time. + + =
@@ -273,7 +280,7 @@ This allows for the configuration of complex types with nestle= d classes. Inline beans can be declared inside both <s:value> and <s:key><= /literal> elements, and may be used in both collections = and simple field values. Inline beans must not have any qualif= ier annotations declared on the bean, instead seam-xml assigns = - them an artificial qualifier. Inline beans may have any scope,= however the default Dependent scope is = + them an artificial qualifier. Inline beans may have any scope,= however the default Dependent scope is = recomended. = @@ -288,7 +295,7 @@ billy - + @@ -308,56 +315,56 @@ It is also possible to configure methods in a similar way to conf= iguring fields: = + + - + xmlns:my=3D"urn:java:org.jboss.seam.xml.test.method"> + = - + - + = - + - + - - - + + + - + = - + - + - - + + - + = - + ]]> - - = In this instance MethodBean has three methods,= all of them rather = @@ -409,11 +416,11 @@ the following: = - + - + -]]> +]]> = @@ -436,15 +443,15 @@ @Inject annotation applied to it. Annotations can be= applied to the constructor = parameters in the same manner as method parameters. - + - + = -]]> +]]> - The example above is equivilent to the following java: + The example above is equivalent to the following java: = class MyBean { @Inject = @@ -459,23 +466,25 @@ Overriding the type of an injection point = - It is possible to limit which bean types are availible to inject = int a given injection point: + It is possible to limit which bean types are availible to inject = + into a given injection point: = - - + + com.mydomain.InjectedBean - -]]> + +]]> = In the example above only beans that are assignable to InjectedBe= an will be eligable for injection into the field. - This also works for parameter injection points. + This also works for parameter injection points. This functionallity= is part of Weld Extensions, and the + @Exact annotation can be used directly in java. = =
= @@ -492,26 +501,26 @@ binding and is named:
= - - - - - ]]> = + + + + +]]> = = This configures a qualifier annotation: = - - - ]]> = + + +]]> = = This configures an interceptor binding: - - - ]]> = + + +]]> = = = --===============7541218212148260329==--