Injecting ObjectLocator into a page or component class is not supported. You
need to provide a wrapper service, which uses ObjectLocator. Then inject it
into your page and retrieve your services.

Alternatively you can retrieve the Registry from ServletContext. Check this
out.

http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/TapestryFilter.html#REGISTRY_CONTEXT_NAME

On Thu, Mar 10, 2011 at 11:52 AM, Yohan Yudanara
<yohan.yudan...@gmail.com>wrote:

> Hi..
>
> Could anyone give me an example how to get service bean, without using
> @Inject annotation, in page class?
> Is it using ObjectLocator? What built-in service to inject, in order to use
> ObjectLocator?
>
> I can use this when using tapestry-spring and spring ioc:
> @Inject
> private ApplicationContext springContext;
> and use this statement to get bean:
> entityManager = springContext.getBean(beanNames[0]);
>
> How to do the same thing using tapestry-ioc?
>
> Thanks..
>
> Best regards,
> Yohan
>



-- 
Best regards,

Igor Drobiazko
http://tapestry5.de

Reply via email to