[JBoss JIRA] Created: (SEAMXML-8) Review all deviations from the original JSR-299 draft spec
by Stuart Douglas (JIRA)
Review all deviations from the original JSR-299 draft spec
-----------------------------------------------------------
Key: SEAMXML-8
URL: https://jira.jboss.org/browse/SEAMXML-8
Project: Seam XML Bean Config
Issue Type: Task
Reporter: Stuart Douglas
There a quite a few changes from the draft spec, I have listed them below:
- shorthand field value syntax
You can do <ns:MyBean fieldName="fieldValue" />
- Producer method / field syntax was:
<ns:Bean>
<ns:field>
<Producer>
<ns:SomeQualifier/>
</Producer>
</ns:field>
</ns:Bean>
I have changed this to:
<ns:Bean>
<ns:field>
<Producer/>
<ns:SomeQualifier/>
</ns:field>
</ns:Bean>
- Setting initial field values
You can now do:
<ns:Bean>
<ns:field>
<Producer/>
<value>10</value>
</ns:field>
<ns:field2>5</ns:field2>
<ns:mapField>
<entry><key>a</key><value>b</value></entry>
<e><k>c</k><v>d</v></e>
</ns:mapField/>
</ns:Bean>
The value key and entry tags can be shorted to just <v><k> and <e> tags. The <value> element was not able to be used like this in the original spec, so it was not possible to apply annotations and set the field value.
- <overrides> and <specializes> tags
- Change of syntax for constructor and method parameters
In the draft spec method parameters are specified as direct children of the method like so:
<ns:Bean>
<ns:method>
<Producer/>
<ns:ParamType1><ns:SomeAnntation/></ns:ParamType1>
<ns:SomeOtherAnnotation/>
<ns:ParamType2/>
</ns:method>
</ns:Bean>
This has been changed to:
<ns:Bean>
<ns:method>
<Producer/>
<ns:SomeOtherAnnotation/>
<parameters>
<ns:ParamType1><ns:SomeAnntation/></ns:ParamType1>
<ns:ParamType2/>
</parameters/>
</ns:method>
</ns:Bean>
- Interface configuration
Annotations / field values applied to an interface via XML are applied to all classes that implement that interface.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 11 months
[JBoss JIRA] Created: (SEAMXML-21) Field references should support value attribute
by Dan Allen (JIRA)
Field references should support value attribute
-----------------------------------------------
Key: SEAMXML-21
URL: https://jira.jboss.org/browse/SEAMXML-21
Project: Seam XML Configuration
Issue Type: Feature Request
Affects Versions: 3.0.0.Alpha3
Reporter: Dan Allen
Field references should support a value attribute if the field type is a convertable type* (Seam XML knows how to turn it into an object). This will drastically simplify the appearance and verbosity of a field definitions, particularly virtual fields.
Consider the configuration of the default locale as an example. Presently, it would be configured as follows:
<String>
<Produces/>
<lc:DefaultLocale/>
<value>fr</value>
</String>
Since String is a convertable type, the proposed change would allow it to be simplified to:
<String value="fr">
<Produces/>
<lc:DefaultLocale/>
</String>
Another example would be assigning an numeric value to a bean field. Presently, the configuration is:
<x:Account>
<x:balance>
<value>100</value>
</x:balance>
</x:Account>
With support for the value attribute, this could be simplified to:
<x:Account>
<x:balance value="100"/>
</x:Account>
If the type being configured has a value property, then of course the value attribute would assign the value of property named "value" instead of being treated as the overall value of the field.
* Examples of convertable types are string, date, number, etc.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 11 months