cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Hartmann <andr...@apache.org>
Subject Re: Spring bean for action src
Date Wed, 04 Mar 2009 15:22:18 GMT
Hi Paul,

Schenk, Paul (SD/DS-Accenture) schrieb:
> Hello,
> 
> We are trying to develop a Cocoon 2.2 application. We have developed a 
> few 2.1 apps already. We are struggling with using a spring bean for an 
> action.
> 
> We’d like to do something like:
> 
> (in sitemap.xmap)
> 
>   <map:components>
> 
>     <map:actions>
> 
>       <map:action name="nocache-action" 
> src="org.apache.cocoon.acting.HttpCacheAction">
> 
>           <seconds>2</seconds>
> 
>       </map:action>
> 
>       <map:action name="NBCLinkForm" src="LinkForm"/>
> 
>     </map:actions>
> 
>   </map:components>
> 
> We define the bean in applicationContext.xml:
> 
> <bean id="LinkForm" class="com.gnb.forms.LinkForm">

I'm not sure, but I think that has to read

<bean name="org.apache.cocoon.acting.Action/LinkForm" 
class="com.gnb.forms.LinkForm">

Then you should be able to reference the action with the name "LinkForm" 
in your sitemap, without additionally declaring it in the 
<map:components> section.

-- Andreas



-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message