[seam-issues] [JBoss JIRA] Commented: (SEAMXML-21) Field references should support value attribute

Stuart Douglas (JIRA) jira-events at lists.jboss.org
Mon Nov 29 01:44:09 EST 2010


    [ https://jira.jboss.org/browse/SEAMXML-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565755#comment-12565755 ] 

Stuart Douglas commented on SEAMXML-21:
---------------------------------------

Currently you can do:

<x:balance>100</x:balance>

Also:

<x:balance><s:value>100</s:value></x:balance>

I am not sure if we really need three different ways of setting the field value.


> 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

        


More information about the seam-issues mailing list