You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Scott F. Walter" <sc...@vivare.com> on 2005/07/07 23:44:15 UTC

TP4: Injecting Engines

According to the JavaDocs, getService() in IEngine has been deprecated, 
and the docs says that engine services are to be injected.  So I thought 
I would try this with the Chart service.

I have injected the service into the ChartAsset class (extends 
AbstractAsset)
    @InjectState("chart")
    public abstract ChartService getChartService();  

Inside my page I have method to get access to the asset with:

    public IAsset getChartImageAsset(){
        return new ChartAsset(getRequestCycle(), this);
    } 

Of course this is causing compile time errors, since  I had to make 
ChartAsset an abstract class to inject the state and you can't 
instantiate abstrat classes.  Am I doing the injection wrong???  Any 
ideas???

scott.
-- 

Scott F. Walter 	Scott F. Walter
Principal Consultant
Vivare, Inc.

E: scott.walter@vivare.com
E: scott@scottwalter.com
Visit scottwalter.com <http://scottwalter.com> --Point.  Click.  Explore!




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