You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Reinhard Poetz <re...@apache.org> on 2006/11/21 00:28:03 UTC
Defining a generator as Spring bean
Is it possible to define sitemap components in Spring configuration files?
I tried
<bean id="org.apache.cocoon.generators.Generator/myGenerator"
class="x.myGenerator"/>
but without success because using
<map:generate name="myGenerator"/>
didn't work.
Does anybody know how to make this work? [\me glancing at Carsten ;-)].
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
___________________________________________________________
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
Re: Defining a generator as Spring bean
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Reinhard Poetz wrote:
> it was my fault (see the difference in the bean name). For those who are
> interested, here is my working bean definition:
>
> <bean name="org.apache.cocoon.generation.Generator/daisy"
> class="org.daisycms.clientapp.cocoon.DaisyGenerator">
> <property name="daisyAccessFacade"
> ref="org.daisycms.clientapps.facade"/>
> </bean>
just out of curiosity: how does this generator gets standard lifecycle
applied?
--
Leszek Gawron CTO at MobileBox Ltd.
Re: Defining a generator as Spring bean
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Reinhard Poetz wrote:
> <bean name="org.apache.cocoon.generation.Generator/daisy"
> class="org.daisycms.clientapp.cocoon.DaisyGenerator">
> <property name="daisyAccessFacade"
> ref="org.daisycms.clientapps.facade"/>
> </bean>
just a reminder, same goes for apples:
in applicationContext.xml:
<bean id="storeInvestmentApple" parent="xmlRequestApple"
class="com.mobilebox.xxx.pi.server.mobileapi.apples.StoreInvestmentApple">
<property name="investmentParser" ref="investmentParser"/>
<property name="investmentService" ref="investmentService"/>
</bean>
sitemap.xmap:
<map:flow language="service-apples"/>
<map:pipelines>
<map:pipeline type="caching">
<map:match pattern="*">
<map:call function="{1}Apple"/>
</map:match>
</map:pipeline>
</map:pipelines>
--
Leszek Gawron CTO at MobileBox Ltd.
Re: Defining a generator as Spring bean
Posted by Reinhard Poetz <re...@apache.org>.
Carsten Ziegeler wrote:
> Reinhard Poetz schrieb:
>> Is it possible to define sitemap components in Spring configuration files?
>>
>> I tried
>>
>> <bean id="org.apache.cocoon.generators.Generator/myGenerator"
>> class="x.myGenerator"/>
>>
>> but without success because using
>>
>> <map:generate name="myGenerator"/>
>>
>> didn't work.
>>
>> Does anybody know how to make this work? [\me glancing at Carsten ;-)].
>>
> It should work (I think)...Did you get an exception?
it was my fault (see the difference in the bean name). For those who are
interested, here is my working bean definition:
<bean name="org.apache.cocoon.generation.Generator/daisy"
class="org.daisycms.clientapp.cocoon.DaisyGenerator">
<property name="daisyAccessFacade" ref="org.daisycms.clientapps.facade"/>
</bean>
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
___________________________________________________________
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
Re: Defining a generator as Spring bean
Posted by Carsten Ziegeler <cz...@apache.org>.
Reinhard Poetz schrieb:
> Is it possible to define sitemap components in Spring configuration files?
>
> I tried
>
> <bean id="org.apache.cocoon.generators.Generator/myGenerator"
> class="x.myGenerator"/>
>
> but without success because using
>
> <map:generate name="myGenerator"/>
>
> didn't work.
>
> Does anybody know how to make this work? [\me glancing at Carsten ;-)].
>
It should work (I think)...Did you get an exception?
Carsten
--
Carsten Ziegeler - Chief Architect
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/