[prev in list] [next in list] [prev in thread] [next in thread]
List: groovy-user
Subject: Re: [groovy-user] Problem with Groovy and spring framework
From: Tom Nichols <tmnichols () gmail ! com>
Date: 2009-09-29 17:05:07
Message-ID: d8cb87ee0909291005w501eb2f0x254e65d5ddd2a259 () mail ! gmail ! com
[Download RAW message or body]
Second that. Spring is not a dynamic inheritance mechanism. The idea
is that if you had multiple child classes in your spring
configuration, you could configure a single parent "template" class
which defines values for the common properties between them.
On Tue, Sep 29, 2009 at 12:25 PM, Miguel Angel Pastor Olivar
<miguelinlas3@gmail.com> wrote:
> Hi,
>
> class BeanB must inherit from class BeanA!
>
> Parent relationship in beans definition is not the same that class
> inheritance. Parent beans only collects "common" properties.
>
> Regards,
>
> Migue
>
> 2009/9/29 chrisjasp <chrisjasp@gmail.com>
>>
>> Sure.
>>
>> public class BeanA{
>>
>> public def Myproperty
>>
>> }
>>
>> public class BeanB{
>>
>> private SwingBuilder swing = new Swingbuilder
>>
>> public void startUI(){
>> .....
>>
>> def test = Myproperty
>> assert test == 'thisisatest'
>> .....
>> }
>> }
>>
>>
>> <beans>
>> <bean id="beana" class="BeanA">
>> <property name="Myproperty" value="thisisatest" />
>> </bean>
>> <bean id="beanb" class="BeanB" parent="beana" />
>> </beans>
>> --
>> View this message in context:
>> http://www.nabble.com/Problem-with-Groovy-and-spring-framework-tp25665467p25666106.html
>> Sent from the groovy - user mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>> http://xircles.codehaus.org/manage_email
>>
>>
>
>
>
> --
> Nos vemos
> migue
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic