[JBoss JIRA] Created: (SEAMXML-25) Introduce s:values tag
by Jozef Hartinger (JIRA)
Introduce s:values tag
----------------------
Key: SEAMXML-25
URL: https://issues.jboss.org/browse/SEAMXML-25
Project: Seam Config
Issue Type: Feature Request
Affects Versions: 3.0.0.Beta1
Reporter: Jozef Hartinger
Priority: Minor
Currently, it is quite verbose to populate a collection with configured object instances using the XML module.
For example:
Foo is a class having a collection (bars) of Bars
<e:Foo>
<e:bars>
<s:value>
<e:Bar id="1"/>
</s:value>
<s:value>
<e:Bar id="2"/>
</s:value>
<s:value>
<e:Bar id="3"/>
</s:value>
<s:value>
<e:Bar id="4"/>
</s:value>
</e:bars>
</e:Foo>
If the s:values tag is introduced, it'll make the configuration less verbose
<e:Foo>
<e:bars>
<s:values>
<e:Bar id="1"/>
<e:Bar id="2"/>
<e:Bar id="3"/>
<e:Bar id="4"/>
</s:values>
</e:bars>
</e:Foo>
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 6 months
[JBoss JIRA] Created: (SEAMXML-22) support collection and array virtual fields
by Dan Allen (JIRA)
support collection and array virtual fields
-------------------------------------------
Key: SEAMXML-22
URL: https://jira.jboss.org/browse/SEAMXML-22
Project: Seam XML Configuration
Issue Type: Feature Request
Affects Versions: 3.0.0.Beta1
Reporter: Dan Allen
Fix For: 3.0.0.Beta2
Add support for defining virtual fields that are of type collection or array. This should work already in theory, but no matter what I tried, I got errors, so it may simply be broken. There is also one piece missing. There needs to be a way to specify the collection type parameter (item type). I'm envisioning something like this:
<List>
<Integer/> <-- defines item type
<app:DiceValues/>
<value>1</value>
<value>2</value>
<value>3</value>
<value>4</value>
<value>5</value>
<value>6</value>
</List>
defines the virtual field:
@DiceValues
List<Integer> anonymous;
In the same way, we should support virtual arrays:
<array>
<Integer/>
<app:DiceValues/>
<value>1</value>
<value>2</value>
<value>3</value>
<value>4</value>
<value>5</value>
<value>6</value>
</array>
producing:
@DiceValues
Integer[] anonymous;
The nested element for the type is a bit awkward, though (I suggested it because it's currently how array's are typed). It would make more sense to use an attribute here:
<List itemType="java.lang.Integer">
...
</List>
Also, a way to control the implementation type:
<List type="java.util.ArrayList" itemType="java.lang.Integer">
...
</List>
Once working, there definitely needs to be an example (or two) added to the documentation.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 6 months