You can use annotations since something like @InjectObject utilises the ObjectProviders configuration.

Could you not do something like this:

@InjectObject("instance:com.test.MyTableModel")
public TableModel getTableModel()

there are also bean and spring object providers already defined that you could use.

On 9/19/05, Norbert Sándor <[EMAIL PROTECTED]> wrote:
I would prefere an annotation-based solution because for example I create the table columns dynamically (using the new operator).
 
BR,
Norbi
----- Original Message -----
Sent: Monday, September 19, 2005 3:35 PM
Subject: RE: injecting services/objects to "external" POJOs

Maybe you should have a look at hiveutils.ObjectBuilder service (and the ObjectBuilderObjects configuration)? This is part of HiveMind Utilities…

 

Cheers

 

            Jean-Francois, HiveMind Utilities

 


From: Norbert Sándor [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 19, 2005 7:48 PM
To: Users HiveMind
Subject: injecting services/objects to "external" POJOs

 

Hi,

 

I often need access to services or other objects in the registry from "external" classes. On "external" I mean some class which does not have implicit access to the registry. These are usually smaller utility/definition classes, like table models, table column definitions, etc. in case of Tapestry.

Is there an existing solution for this problem? (Like a special classloader which can inject objects to any class, similar to Tapestry's solution.)

 

Thanks,

Norbi


Reply via email to