Why <inject/> doesn't scale?
As far as I know there are three ways to access your registry ASO's and
services:
1. annotations
2. <inject>
3. Creating a custom engine service and injecting the object via setter
based dependency using their interfaces as parameters for the setter,
which in my opinion is even a heavier and a more complicated solution.
Are there other ways?
best regards.
Raul Raja.
Mark wrote:
Hello everybody,
attached below is an excerpt of the code from the VLib sample project -
the VlibPage Class to be more exact.
I assume this is the BasePage subclass that is used for most (if not
all) pages of the Vlib application.
It uses annotations to access all the required beans, objects and
services that are defined in Hivemind.
How can I get to those objects and services if I use JDK 1.4 and do not
have annotations?
Please don't say "use <Inject> in the .page files" - I know that, but
that doesn't scale at all... There has to be some better way, no?!
Thanks a lot for your help!
MARK
====================================================
public abstract class VlibPage extends BasePage implements
IErrorProperty, IMessageProperty,
PageValidateListener, OperationsUser
{
@Bean(VirtualLibraryDelegate.class)
public abstract IValidationDelegate getValidationDelegate();
@InjectState("visit")
public abstract Visit getVisitState();
@InjectStateFlag("visit")
public abstract boolean getVisitStateExists();
@InjectPage("Login")
public abstract Login getLogin();
@InjectMeta("anonymous-access")
public abstract boolean getAllowAnonymousAccess();
@InjectMeta("admin-page")
public abstract boolean isAdminPage();
@InjectObject("service:vlib.ModelSource")
public abstract ModelSource getModelSource();
====================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]