Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 56194 invoked from network); 10 Jul 2007 15:22:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jul 2007 15:22:25 -0000 Received: (qmail 22398 invoked by uid 500); 10 Jul 2007 15:22:27 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 22149 invoked by uid 500); 10 Jul 2007 15:22:26 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 22138 invoked by uid 99); 10 Jul 2007 15:22:26 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jul 2007 08:22:26 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of riceyeh@gmail.com designates 66.249.92.169 as permitted sender) Received: from [66.249.92.169] (HELO ug-out-1314.google.com) (66.249.92.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jul 2007 08:22:22 -0700 Received: by ug-out-1314.google.com with SMTP id o2so1258514uge for ; Tue, 10 Jul 2007 08:22:01 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=JI/fL3kk7Vqf9wjMndp5uDQ8J8Px8DAELAp9p0SkNOci23fbUXgtip7s1hRm0hA44MLTii4ujZ28QIr7aXxiwjFj8JH+ozyb0j8GDzh4Up09lh1vA8vDLwjzjlE95ZMeLNt8NsIoM4uPYYfZTZnBtetewIOnUXY9kHdHa47F3QU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Qo6ZjbEFHhYynyO5V54BxzZ91/gMFv0JUIRAtLqFLsWGMym88rEgzxUgTcDcQIpGgXox0y6nY06t4EKYWznvlA6tP0yrWyZr0USU8O29VCvQ+so73TkZB40zAvjkI8tbmFqVpOnrHbnJIwP2dXPxWNpbKCEIiUcezHlZEmhK9Do= Received: by 10.78.147.6 with SMTP id u6mr2087634hud.1184080921260; Tue, 10 Jul 2007 08:22:01 -0700 (PDT) Received: by 10.78.134.10 with HTTP; Tue, 10 Jul 2007 08:22:01 -0700 (PDT) Message-ID: <47f71d940707100822n4bad0edcjf669955e6ea7c523@mail.gmail.com> Date: Tue, 10 Jul 2007 23:22:01 +0800 From: "Rice Yeh" To: dev@cocoon.apache.org Subject: Re: Is it allowed to access a bean created in avalon in a spring bean definition? In-Reply-To: <46939149.3040005@apache.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_136186_20287576.1184080921238" References: <47f71d940707100559j6253c2ccxc62f51bda72105c2@mail.gmail.com> <46938D90.1000401@apache.org> <46939149.3040005@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_136186_20287576.1184080921238 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 7/10/07, Carsten Ziegeler 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? > > > >> > >> > >> > >> > >> > > > > 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: > 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 > > > ------=_Part_136186_20287576.1184080921238 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
On 7/10/07, Carsten Ziegeler <cziegeler@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



------=_Part_136186_20287576.1184080921238--