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.
I would prefere an annotation-based solution because for example I create the table columns dynamically (using the new operator).BR,Norbi----- Original Message -----From: Jean-Francois PoilpretSent: Monday, September 19, 2005 3:35 PMSubject: RE: injecting services/objects to "external" POJOsMaybe 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
