You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Rice Yeh <ri...@gmail.com> on 2007/07/10 14:59:45 UTC
Is it allowed to access a bean created in avalon in a spring bean definition?
Hi,
Is it allowed to access a bean created in avalon in a spring bean
definition? I try to access the FormManager in the following spring xml
file, but it returns null.
<bean id="widgetDefinitionBuilderLoader" class="
xs.cocoon.forms.WidgetDefinitionBuilderLoader" scope="singleton">
<constructor-arg>
<idref bean="org.apache.cocoon.forms.FormManager"/>
</constructor-arg>
</bean>
Regards,
Rice
Re: Is it allowed to access a bean created in avalon in a spring bean definition?
Posted by Rice Yeh <ri...@gmail.com>.
On 7/10/07, Carsten Ziegeler <cz...@apache.org> wrote:
>
> Grzegorz Kossakowski wrote:
> > Rice Yeh pisze:
> >> Hi,
> >> Is it allowed to access a bean created in avalon in a spring bean
> >> definition?
> >
> > Yes.
> >
> >> I try to access the FormManager in the following spring xml file, but
> >> it returns null.
> >
> > Did you check was logs say?
> >
> >> <bean id="widgetDefinitionBuilderLoader" class="
> >> xs.cocoon.forms.WidgetDefinitionBuilderLoader" scope="singleton">
> >> <constructor-arg>
> >> <idref bean="org.apache.cocoon.forms.FormManager"/>
> >> </constructor-arg>
> >> </bean>
> >
> > What about org.apache.cocoon.forms.DefaultFormManager as bean id? (wild
> > guessing here)
> >
> Hmm, no "org.apache.cocoon.forms.FormManager" is correct, as you have to
> use the Avalon role as the bean id.
>
> I have currently no clue what idref bean="" does, I'm using:
> <constructor-arg ref="org.apache.cocoon.forms.FormManager"/>
Yes, it works now. idref seems just pass the id of the bean and is a string.
I should use ref.
Thanks.
Rice
Does your bean have several constructors?
>
> HTH
> Carsten
>
> --
> Carsten Ziegeler
> cziegeler@apache.org
>
>
>
Re: Is it allowed to access a bean created in avalon in a spring
bean definition?
Posted by Carsten Ziegeler <cz...@apache.org>.
Grzegorz Kossakowski wrote:
> Rice Yeh pisze:
>> Hi,
>> Is it allowed to access a bean created in avalon in a spring bean
>> definition?
>
> Yes.
>
>> I try to access the FormManager in the following spring xml file, but
>> it returns null.
>
> Did you check was logs say?
>
>> <bean id="widgetDefinitionBuilderLoader" class="
>> xs.cocoon.forms.WidgetDefinitionBuilderLoader" scope="singleton">
>> <constructor-arg>
>> <idref bean="org.apache.cocoon.forms.FormManager"/>
>> </constructor-arg>
>> </bean>
>
> What about org.apache.cocoon.forms.DefaultFormManager as bean id? (wild
> guessing here)
>
Hmm, no "org.apache.cocoon.forms.FormManager" is correct, as you have to
use the Avalon role as the bean id.
I have currently no clue what idref bean="" does, I'm using:
<constructor-arg ref="org.apache.cocoon.forms.FormManager"/>
Does your bean have several constructors?
HTH
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
Re: Is it allowed to access a bean created in avalon in a spring
bean definition?
Posted by Grzegorz Kossakowski <gk...@apache.org>.
Rice Yeh pisze:
> Hi,
> Is it allowed to access a bean created in avalon in a spring bean
> definition?
Yes.
> I try to access the FormManager in the following spring xml
> file, but it returns null.
Did you check was logs say?
> <bean id="widgetDefinitionBuilderLoader" class="
> xs.cocoon.forms.WidgetDefinitionBuilderLoader" scope="singleton">
> <constructor-arg>
> <idref bean="org.apache.cocoon.forms.FormManager"/>
> </constructor-arg>
> </bean>
What about org.apache.cocoon.forms.DefaultFormManager as bean id? (wild guessing here)
--
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/