You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Dan Tran <da...@gmail.com> on 2012/11/04 19:06:45 UTC

How to inject a list of beans into blueprint component??

Hello

In Spring I can do that via

  <bean id="myBean" class="myclass">

    <property name="myProp">
      <list>
        <ref bean="bean1" />
        <ref bean="bean2" />
        .....
      </list>
    </property>

  </bean>

Blueprint does not take that format, and I could find any example and
doc to do that in blueprint either

Big thanks ahead for the tip

-D

Re: How to inject a list of beans into blueprint component??

Posted by Dan Tran <da...@gmail.com>.
Thanks for the hints

the working syntax is

<list>
  <ref component-id="bean-1/>
  <ref component-id="bean-2/>
  ....
</list>


-D

On Sun, Nov 4, 2012 at 2:23 PM, Ansgar Konermann
<an...@googlemail.com> wrote:
> Search for
>
> <ref component-id=”accountOne”/> on that website.
>
> What else do you need?
>
> Am 04.11.2012 20:24 schrieb "Dan Tran" <da...@gmail.com>:
>
>> been there many time,
>>
>> and it only show value list
>>
>> <list>
>>        <value>123</value>
>>        <value type=”java.math.BigInteger”>456</value>
>>        <null/>
>>        <set value-type=”java.lang.Integer”>
>>            <value>1</value>
>>            <value>2</value>
>>        </set>
>>    </list>
>>
>>
>> Thanks for suggestion
>>
>> -D
>>
>> On Sun, Nov 4, 2012 at 11:05 AM, dealbitte <an...@gmail.com> wrote:
>> >
>> > Take a look at the examples in the tutorial below. It helped me a lot to
>> > configure dependency injection via blueprint
>> >
>> > http://www.ibm.com/developerworks/opensource/library/os-osgiblueprint/index.html
>> >
>> >
>> > regards
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> > http://karaf.922171.n3.nabble.com/How-to-inject-a-list-of-beans-into-blueprint-component-tp4026671p4026672.html
>> > Sent from the Karaf - User mailing list archive at Nabble.com.

Re: How to inject a list of beans into blueprint component??

Posted by Ansgar Konermann <an...@googlemail.com>.
Search for

<ref component-id=”accountOne”/> on that website.

What else do you need?
Am 04.11.2012 20:24 schrieb "Dan Tran" <da...@gmail.com>:

> been there many time,
>
> and it only show value list
>
> <list>
>        <value>123</value>
>        <value type=”java.math.BigInteger”>456</value>
>        <null/>
>        <set value-type=”java.lang.Integer”>
>            <value>1</value>
>            <value>2</value>
>        </set>
>    </list>
>
>
> Thanks for suggestion
>
> -D
>
> On Sun, Nov 4, 2012 at 11:05 AM, dealbitte <an...@gmail.com> wrote:
> >
> > Take a look at the examples in the tutorial below. It helped me a lot to
> > configure dependency injection via blueprint
> >
> http://www.ibm.com/developerworks/opensource/library/os-osgiblueprint/index.html
> >
> >
> > regards
> >
> >
> >
> > --
> > View this message in context:
> http://karaf.922171.n3.nabble.com/How-to-inject-a-list-of-beans-into-blueprint-component-tp4026671p4026672.html
> > Sent from the Karaf - User mailing list archive at Nabble.com.
>

Re: How to inject a list of beans into blueprint component??

Posted by Dan Tran <da...@gmail.com>.
been there many time,

and it only show value list

<list>
       <value>123</value>
       <value type=”java.math.BigInteger”>456</value>
       <null/>
       <set value-type=”java.lang.Integer”>
           <value>1</value>
           <value>2</value>
       </set>
   </list>


Thanks for suggestion

-D

On Sun, Nov 4, 2012 at 11:05 AM, dealbitte <an...@gmail.com> wrote:
>
> Take a look at the examples in the tutorial below. It helped me a lot to
> configure dependency injection via blueprint
> http://www.ibm.com/developerworks/opensource/library/os-osgiblueprint/index.html
>
>
> regards
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/How-to-inject-a-list-of-beans-into-blueprint-component-tp4026671p4026672.html
> Sent from the Karaf - User mailing list archive at Nabble.com.

Re: How to inject a list of beans into blueprint component??

Posted by dealbitte <an...@gmail.com>.
Take a look at the examples in the tutorial below. It helped me a lot to
configure dependency injection via blueprint
http://www.ibm.com/developerworks/opensource/library/os-osgiblueprint/index.html


regards



--
View this message in context: http://karaf.922171.n3.nabble.com/How-to-inject-a-list-of-beans-into-blueprint-component-tp4026671p4026672.html
Sent from the Karaf - User mailing list archive at Nabble.com.