org.apache.wicket.injection
Class ComponentInjector
java.lang.Object
org.apache.wicket.injection.ComponentInjector
- All Implemented Interfaces:
- IComponentInstantiationListener
- Direct Known Subclasses:
- SpringComponentInjector
public class ComponentInjector
- extends Object
- implements IComponentInstantiationListener
Enables your application to do dependency injection. To use, register the injector as a
IComponentInstantiationListener
like this:
... (in your application's constructor or init method)
addComponentInstantiationListener(new ComponentInjector());
...
- Author:
- Eelco Hillenius
- See Also:
IComponentInstantiationListener
,
Application.addComponentInstantiationListener(org.apache.wicket.application.IComponentInstantiationListener)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ComponentInjector
public ComponentInjector()
- Construct.
onInstantiation
public void onInstantiation(Component component)
- Description copied from interface:
IComponentInstantiationListener
- Called for every component that is instantiated. This method is called
during construction, so do not depend on the construction being completed
yet. The id is guaranteed to be set before this call.
- Specified by:
onInstantiation
in interface IComponentInstantiationListener
- Parameters:
component
- the component that is being instantiated.- See Also:
IComponentInstantiationListener.onInstantiation(org.apache.wicket.Component)
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.