Thanks Filip !
I didn't see the alias override functionnality of Tapestry. It's working
now !
Julien
Filip S. Adamsen a écrit :
Hi,
Sounds like you need to provide an alias override.
See
http://tapestry.apache.org/tapestry5/tapestry-core/guide/alias.html
for information on how to do that.
-Filip
On 2008-07-15 17:28, Julien Giovaresco wrote:
I'd like to provide a new SymbolSource service without the cache
functionnality in order to allow me to change the value of severals
of my symbols.
My problem is that I can't define a new implementation of
SymbolSource interface (like this :
p_Binder.bind(SymbolSource.class,FwlSymbolSource.class).withId("FwlSymbolSource");
) because Tapestry throw me the following exception (I've attached
the whole stack)
/java.lang.RuntimeException: Service interface
org.apache.tapestry5.ioc.services.SymbolSource is matched by 2
services: FwlSymbolSource, SymbolSource. Automatic dependency
resolution requires that exactly one service implement the interface./
Maybe it's impossible to provide another implementation for this
service interface...
Regards,
Julien.
Kristian Marinkovic a écrit :
hi Julien,
the default SymbolSource is qualified by the @Builtin marker...
eg.:
... build(@Builtin SymbolSource t5SymbolSource)....
are you trying to replace the whole SymbolSource service?
g,
kris
Julien Giovaresco <[EMAIL PROTECTED]> 15.07.2008 17:05
Bitte antworten an
"Tapestry users" <[email protected]>
An
Tapestry users <[email protected]>
Kopie
Thema
Re: [T5] Create a new SymbolSource service
Kristian,
thanks for your reply.
I've already qualified my new implementation of the interface
org.apache.tapestry5.ioc.services.SymbolSource like this :
/p_Binder.bind(SymbolSource.class,
FwlSymbolSource.class).withId("FwlSymbolSource");/
However the "default" implementation of this interface is defined in
TapestryIOCModule class without a service Id.
Regards,
Julien
Kristian Marinkovic a écrit :
hi Julien,
if you want to define two (or more) services with the same
interface you have to qualify them.
if you use the binder method:
public static void bind(ServiceBinder binder)
{
binder.bind(SymbolSource.class, MySymbolSourceImpl.class
).withId("mySymbolSource");
...
or as builder method
public SymbolSource buildMySymbolSource(...) {}
everytime you want to inject your service you'll have to qualify it
as well:
public Interface build(@InjectService("mySymbolsource")
SymbolSource mySymbolSource)
{}
i hope this helps.
g,
kris
Julien Giovaresco <[EMAIL PROTECTED]> 15.07.2008 16:26
Bitte antworten an
"Tapestry users" <[email protected]>
An
[email protected]
Kopie
Thema
[T5] Create a new SymbolSource service
Hi everyone,
I'd like to create a new service implementing the interface
*org.apache.tapestry5.ioc.services.SymbolSource* to remove the
cache functionnality of the Tapestry service *SymbolSourceImpl*.
However I can't create such a service because I've the following
exception :
/Service interface org.apache.tapestry5.ioc.services.SymbolSource
is matched by 2 services: FwlSymbolSource, SymbolSource. Automatic
dependency resolution requires that exactly one service implement
the interface./
Can I prevent this problem ?
Regards,
Julien
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]