You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Curtis Paris <cp...@shopping.com> on 2006/01/24 22:44:35 UTC

Workbench project upgrading to 4.0 - Abstract object instantiation

I was looking through the workbench project, and had an issue with
upgrading it to be 4.0 compatible.

 

The big hit right now is dealing with the ChartAsset.  

 

Currently the ChartPage.java code does a "new
ChartAsset(getRequestCycle(), this);".  But, ChartAsset needs to have an
abstract method for 

 

@InjectObject("engine-service:Chart") public abstract IEngineService
getChartService();

 

Being that IEngine.getService() is deprecated, how do we create the
chart asset now that we are using this abstracted class methodology?

 

 

Curtis Paris

Sr. Software Engineer

cparis@shopping.com

650 616 6581 office

 

Shopping.com (tm)

Find. Compare. Buy.

www.shopping.com <blocked::outbind://48/www.shopping.com> 

 


Re: Workbench project upgrading to 4.0 - Abstract object instantiation

Posted by Ron Piterman <rp...@gmx.net>.
I am not quite familiar with the workbench, but could imagine you should 
create a CharAsset factory as hivemind service, and inject it to your 
page/component.

Cheers,
Ron


Curtis Paris wrote:
> I was looking through the workbench project, and had an issue with
> upgrading it to be 4.0 compatible.
> 
>  
> 
> The big hit right now is dealing with the ChartAsset.  
> 
>  
> 
> Currently the ChartPage.java code does a "new
> ChartAsset(getRequestCycle(), this);".  But, ChartAsset needs to have an
> abstract method for 
> 
>  
> 
> @InjectObject("engine-service:Chart") public abstract IEngineService
> getChartService();
> 
>  
> 
> Being that IEngine.getService() is deprecated, how do we create the
> chart asset now that we are using this abstracted class methodology?
> 
>  
> 
>  
> 
> Curtis Paris
> 
> Sr. Software Engineer
> 
> cparis@shopping.com
> 
> 650 616 6581 office
> 
>  
> 
> Shopping.com (tm)
> 
> Find. Compare. Buy.
> 
> www.shopping.com <blocked::outbind://48/www.shopping.com> 
> 
>  
> 
> 


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


Re: Workbench project upgrading to 4.0 - Abstract object instantiation

Posted by Shing Hing Man <ma...@yahoo.com>.
I can think of the ways of doing it.

Method 1 :
'this' in ChartAsset(getRequestCycle(), this) is of
type IComponent,

Put the following annotation in 'this' java file 
 @InjectObject("engine-service:Chart") public abstract
IEngineService
  getChartService();

Then you can pass the chart service to ChartAsset via
an constructor.


Method 2 :  Use hivemind to set up a  ChartAsset
service so that the chart service is injected to
ChartAsset by hivemind.


Shing



--- Curtis Paris <cp...@shopping.com> wrote:

> I was looking through the workbench project, and had
> an issue with
> upgrading it to be 4.0 compatible.
> 
>  
> 
> The big hit right now is dealing with the
> ChartAsset.  
> 
>  
> 
> Currently the ChartPage.java code does a "new
> ChartAsset(getRequestCycle(), this);".  But,
> ChartAsset needs to have an
> abstract method for 
> 
>  
> 
> @InjectObject("engine-service:Chart") public
> abstract IEngineService
> getChartService();
> 
>  
> 
> Being that IEngine.getService() is deprecated, how
> do we create the
> chart asset now that we are using this abstracted
> class methodology?
> 
>  
> 
>  
> 
> Curtis Paris
> 
> Sr. Software Engineer
> 
> cparis@shopping.com
> 
> 650 616 6581 office
> 
>  
> 
> Shopping.com (tm)
> 
> Find. Compare. Buy.
> 
> www.shopping.com
> <blocked::outbind://48/www.shopping.com> 
> 
>  
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html


	
	
		
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com

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