I meant the "Instantiatable" interface you mentioned.  I would assume
that it would be a marker interface that would indicate to Wicket that
you want it injected.  This already happens with @SpringBean without
the need for an interface.  If the injector sees a @SpringBean field,
it injects it.  For other classes (like models and the like), if you
have a superclass that injects in its constructor, you're covered.

On Thu, Sep 23, 2010 at 6:24 AM, Ernesto Reinaldo Barreiro
<reier...@gmail.com> wrote:
> The interface  IComponentInstantiationListener is tied to component:
>
> public interface IComponentInstantiationListener
> {
>        /**
>         * Called for every component that is instantiated. This method is 
> called
>         * <strong>during</strong> construction, so do not depend on the
> construction being completed
>         * yet. The id is guaranteed to be set before this call.
>         *
>         * @param component
>         *            the component that is being instantiated.
>         */
>        void onInstantiation(Component component);
> }
>
> Ernesto
>
> On Thu, Sep 23, 2010 at 12:17 PM, James Carman
> <ja...@carmanconsulting.com> wrote:
>> So, why would you need an interface, then?  Just do this.
>>
>> On Thu, Sep 23, 2010 at 6:16 AM, Ernesto Reinaldo Barreiro
>> <reier...@gmail.com> wrote:
>>> Well you could have your hierarchy of classes and on your base class call
>>>
>>> getApplication().notifyComponentInstantiationListeners(this);
>>>
>>> As component does.
>>>
>>> Ernesto
>>>
>>> On Thu, Sep 23, 2010 at 12:11 PM, James Carman
>>> <ja...@carmanconsulting.com> wrote:
>>>> On Thu, Sep 23, 2010 at 5:46 AM, Ernesto Reinaldo Barreiro
>>>> <reier...@gmail.com> wrote:
>>>>>
>>>>> So that other classes could use the same trick by implementing 
>>>>> IInstantiable ?
>>>>>
>>>>
>>>> How, exactly, is Wicket going to know when they're instantiated?  The
>>>> only way the component instantiation stuff works is that the Component
>>>> constructor does the notification.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to