"Read The Friendly Manual" :-)

http://tapestry.apache.org/defining-tapestry-ioc-services.html, look for the "Service Ids" section.



On 8/10/2017 12:38 PM, Pavel Chernyak wrote:
Hi there.

public static void bind(ServiceBinder binder) {
      binder.bind(SomeServiceInterface.class,
SomeServiceImpl.class).withId("someId");
}

And in @inject annotation you will require to specify "someId" as name.

On 10 August 2017 at 18:44, Nathan Quirynen <nat...@pensionarchitects.be>
wrote:

Hi,

When having just one implementation of a service interface the binding is
done like the following:

public static void bind(ServiceBinder binder) {
      binder.bind(SomeServiceInterface.class, SomeServiceImpl.class);
}

But now I need to bind the interface to one of multiple possible
implementations. The condition is just based on a symbol value.
How would I do this conditional binding?

Nathan


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to