You could get rid of the unnecessary interface using @InjectService or a
marker annotation
eg:
binder.bind(MethodAdvice.class,
ExceptionDisplayMethodAdviceImpl.class).withId("foo");
...
@InjectService("foo")
private MethodAdvice advice;
More info here:
http://tapestry.apache.org/defining-tapestr
I'm not sure if the following is what the hints above meant, however it works,
in case it can be useful to others. Thanks for the help.
-
package myproject.tapestry.services;
import org.apache.tapestry5.plastic.MethodAdvice;
public interface ExceptionDisplayMethodAdv
As a simple rule, if you instantiated the object yourself, @Inject won't
work.
See here:
private final MethodAdvice advice = new MethodAdvice() ...
You've used "new" so it's not under tapestry's control.
Hello,
I have the following class to handle the execution of methods that are
annotated with
On Wed, 18 Jun 2014 12:01:16 -0300, Davide Vecchi wrote:
Hi,
Hi!
Sorry, I don't understand. Do you mean that I'm right that
PageRenderLinkSource and Response should be only injected into pages or
components ?
Nope. I said it can be injected into pages, components, mixins,
Tapestry-I
Hi,
Sorry, I don't understand. Do you mean that I'm right that PageRenderLinkSource
and Response should be only injected into pages or components ?
Could you elaborate a little bit about including Tapestry-IoC services and
objects instantiated using ObjectLocator.autobuild() ?
On Wed, 18 Jun 2014 11:47:16 -0300, Davide Vecchi wrote:
Hello,
Hi!
I have the following class to handle the execution of methods that are
annotated with a custom @ExceptionDisplay annotation. Everything works
as expected, but I would like to redirect to a page. I'm using
PageRenderLin
Hello,
I have the following class to handle the execution of methods that are
annotated with a custom @ExceptionDisplay annotation. Everything works as
expected, but I would like to redirect to a page. I'm using
PageRenderLinkSource and Response to do that. I inject them in the same way I
usual