You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by am...@yahoo.com on 2006/01/25 21:08:42 UTC

Problem injecting LinkFactory

Hi,

I am trying to inject LinkFactory but I am not sure what the exact syntax is.

I tried this:   

 @InjectObject("service-property:tapestry.url.LinkFactory")
    public abstract LinkFactory getLinkFactory();

but I get the following error message:

'tapestry.url.LinkFactory' is not a valid locator for use with the  service-property object provider. It should be the id of a service, a comma, and  the name of a property provided by that service.

Thanks,
Amir


Re: Problem injecting LinkFactory

Posted by Howard Lewis Ship <hl...@gmail.com>.
Yes, "service-property:" is used to find a service and extract a
property of that service.  Occasionally useful, but not what to use
here.

In fact, there's more than one way to do this. The following are
effectively the same:

service:tapestry.url.LinkFactory
infrastructure:LinkFactory

The "infrastructure:" prefix is a kind of abstraction that allows
short "aliases" to services (it is also one of the mechanisms by which
built-in Tapestry services can be overridden).

On 1/25/06, Ron Piterman <rp...@gmx.net> wrote:
> try service: instead of service-property (link factory is a service not
> a property of a service... )
> Cheers,
> ROn
>
>
> amirsguard-tapestry@yahoo.com wrote:
> > Hi,
> >
> > I am trying to inject LinkFactory but I am not sure what the exact syntax is.
> >
> > I tried this:
> >
> >  @InjectObject("service-property:tapestry.url.LinkFactory")
> >     public abstract LinkFactory getLinkFactory();
> >
> > but I get the following error message:
> >
> > 'tapestry.url.LinkFactory' is not a valid locator for use with the  service-property object provider. It should be the id of a service, a comma, and  the name of a property provided by that service.
> >
> > Thanks,
> > Amir
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Problem injecting LinkFactory

Posted by Ron Piterman <rp...@gmx.net>.
try service: instead of service-property (link factory is a service not 
a property of a service... )
Cheers,
ROn


amirsguard-tapestry@yahoo.com wrote:
> Hi,
> 
> I am trying to inject LinkFactory but I am not sure what the exact syntax is.
> 
> I tried this:   
> 
>  @InjectObject("service-property:tapestry.url.LinkFactory")
>     public abstract LinkFactory getLinkFactory();
> 
> but I get the following error message:
> 
> 'tapestry.url.LinkFactory' is not a valid locator for use with the  service-property object provider. It should be the id of a service, a comma, and  the name of a property provided by that service.
> 
> Thanks,
> Amir
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org