You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Steph <sd...@cariboo-networks.com> on 2008/03/02 16:01:04 UTC
Injection of Spring bean aliases as services in Tapestry pages
I can easily inject a service A defined in Spring like that :
<bean id="A" class="..."/>
in my tap pages :
@Inject
@Service("A")
private MyObject a;
That works fine.
But if i declare in Spring an alias B on my bean A :
<alias name="A" alias="B"/>
when i try to inject my bean B in my tap pages :
@Inject
@Service("B")
private MyObject b;
Tapestry can't find this service and i get the following exception :
org.apache.tapestry.internal.services.TransformationException: Error
obtaining injected value for field
com.cariboonetworks.ads.pages.MyPage.b: Service id 'B' is not defined by
any module.
Any idea ??
Stephane
Re: Injection of Spring bean aliases as services in Tapestry pages
Posted by Adam Zimowski <zi...@gmail.com>.
http://tapestry.apache.org/tapestry5/tapestry-spring/
Last section at the bottom: "Limitations"
Only the bean name is used, not any of the bean's aliases.
On Sun, Mar 2, 2008 at 9:01 AM, Steph <sd...@cariboo-networks.com> wrote:
> I can easily inject a service A defined in Spring like that :
> <bean id="A" class="..."/>
> in my tap pages :
> @Inject
> @Service("A")
> private MyObject a;
> That works fine.
>
> But if i declare in Spring an alias B on my bean A :
> <alias name="A" alias="B"/>
> when i try to inject my bean B in my tap pages :
> @Inject
> @Service("B")
> private MyObject b;
> Tapestry can't find this service and i get the following exception :
> org.apache.tapestry.internal.services.TransformationException: Error
> obtaining injected value for field
> com.cariboonetworks.ads.pages.MyPage.b: Service id 'B' is not defined by
> any module.
>
> Any idea ??
>
> Stephane
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org