[ 
https://issues.jboss.org/browse/SEAMCONFIG-26?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Porter moved SEAMXML-12 to SEAMCONFIG-26:
-----------------------------------------------

              Project: Seam Config (fixed)  (was: Seam Config)
                  Key: SEAMCONFIG-26  (was: SEAMXML-12)
             Workflow: Seam Workflow  (was: GIT Pull Request workflow )
    Affects Version/s:     (was: 3.0.0.Alpha2)
        Fix Version/s:     (was: 3.0.0.Alpha3)


> Support complex initial values
> ------------------------------
>
>                 Key: SEAMCONFIG-26
>                 URL: https://issues.jboss.org/browse/SEAMCONFIG-26
>             Project: Seam Config (fixed)
>          Issue Type: Feature Request
>            Reporter: Jozef Hartinger
>            Assignee: Stuart Douglas
>
> Currently, setting the value of a field is limited to the following basic 
> types: {primitives, Date, Calendar, Enum, Class}. This is not enough for 
> complex cases.
> It would be great if any class instance could be configured via XML extension 
> and injected into a field.
> Here is an example
> public class Car {
>    private String color;
>    // getters and setters
> }
> @ApplicationScoped
> public class Garage {
>    private Set<Car> cars
>    // getters and setters
> }
> The garage bean could be configured the following way:
> <p:Garage>
>    <s:overrides />
>    <p:cars>
>       <s:value>
>          <p:Car color="blue" />
>       </s:value>
>       <s:value>
>          <p:Car color="red" />
>       </s:value>
>    </p:cars>
> </p:Garage>
> or maybe even:
> <p:Garage>
>    <s:overrides />
>    <p:cars>
>       <p:Car color="blue" />
>       <p:Car color="red" />
>    </p:cars>
> </p:Garage>
> I can see the execution steps as:
> 1) Check that Car is a dependent-scoped component
> 2) For each element inside p:cars
>    a) obtain a (dependent) Car instance from BeanManager
>    b) set properties of the Car instance
>    c) garage.add(car)
> This is a different approach to configuration compared what the XML extension 
> provides so far. While it is currently possible to configure beans, if this 
> feature request is implemented, it will be possible to configure bean 
> instances separately and use these instances to configure a bean.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
seam-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/seam-issues

Reply via email to