James,

I think know how it works: I was just wondering if it can be extended
for other types of objects and how useful it could be.

Ernesto

On Thu, Sep 23, 2010 at 12:09 PM, James Carman
<ja...@carmanconsulting.com> wrote:
> You don't need to have Wicket instantiate anything for you.  The
> listener knows when you instantiate any component (Component's
> constructor does the magic).  Just use @SpringBean in your panel and
> it will work.
>
> On Thu, Sep 23, 2010 at 6:07 AM, Ernesto Reinaldo Barreiro
> <reier...@gmail.com> wrote:
>> Shall I create an RFE? Or this something that does not make much sense?
>>
>> Ernesto
>>
>> On Thu, Sep 23, 2010 at 11:51 AM, nino martinez wael
>> <nino.martinez.w...@gmail.com> wrote:
>>> yeah that would be handy.
>>>
>>> 2010/9/23 Ernesto Reinaldo Barreiro <reier...@gmail.com>:
>>>> Martin,
>>>>
>>>> Yes, I see:
>>>>
>>>> getApplication().notifyComponentInstantiationListeners(this);
>>>>
>>>> Would it make sense (for 1.5) to have:
>>>>
>>>> -an interface IInstantiable
>>>> -modify
>>>>
>>>> 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(IInstantiable component);
>>>> }
>>>>
>>>> So that other classes could use the same trick by implementing 
>>>> IInstantiable ?
>>>>
>>>> Cheers,
>>>>
>>>> Ernesto
>>>>
>>>> On Thu, Sep 23, 2010 at 11:34 AM, Martin Grigorov <mgrigo...@apache.org> 
>>>> wrote:
>>>>> Panel's constructor calls super() and Component's ctor asks the
>>>>> instantiation listener to do its work
>>>>>
>>>>> On Thu, Sep 23, 2010 at 11:21 AM, Ernesto Reinaldo Barreiro <
>>>>> reier...@gmail.com> wrote:
>>>>>
>>>>>> There is a component instantiation listener that takes care of that:
>>>>>> you just use new as "always".
>>>>>>
>>>>>> Ernesto
>>>>>>
>>>>>> On Thu, Sep 23, 2010 at 11:17 AM, nino martinez wael
>>>>>> <nino.martinez.w...@gmail.com> wrote:
>>>>>> > but how should panel then be managed..
>>>>>> >
>>>>>> > Because if I create the panel myself in the page it won't work right?
>>>>>> > Can I ask wicket to instansiate my panel?
>>>>>> >
>>>>>> > 2010/9/23 Martin Grigorov <mgrigo...@apache.org>:
>>>>>> >> Panel is a Component, so you can use @Inject on the Panel members.
>>>>>> >> Use Injector.get().inject(target) only in non Component classes.
>>>>>> >>
>>>>>> >> P.S. The API above is for 1.5.
>>>>>> >>
>>>>>> >> On Thu, Sep 23, 2010 at 11:03 AM, Martin Makundi <
>>>>>> >> martin.maku...@koodaripalvelut.com> wrote:
>>>>>> >>
>>>>>> >>> You must weigh benefits and cons about whereto manage your IOC.
>>>>>> >>>
>>>>>> >>> **
>>>>>> >>> Martin
>>>>>> >>>
>>>>>> >>> 2010/9/23 nino martinez wael <nino.martinez.w...@gmail.com>:
>>>>>> >>> > I need to be able to inject a service into my panel..
>>>>>> >>> >
>>>>>> >>> > Should I then just use:
>>>>>> >>> >
>>>>>> >>> > org.apache.wicket.injection.Injector.get().inject(Object object).
>>>>>> >>> >
>>>>>> >>> > or are there are prettier way? I feel that calling
>>>>>> >>> > org.apache.wicket.injection.Injector.get().inject(Object object)
>>>>>> >>> > inside my panels sort of violates the IOC principle?
>>>>>> >>> >
>>>>>> >>> > 2010/9/23 Martin Makundi <martin.maku...@koodaripalvelut.com>:
>>>>>> >>> >> What is your need exactly?
>>>>>> >>> >>
>>>>>> >>> >> **
>>>>>> >>> >> Martin
>>>>>> >>> >>
>>>>>> >>> >> 2010/9/23 nino martinez wael <nino.martinez.w...@gmail.com>:
>>>>>> >>> >>> Hi
>>>>>> >>> >>>
>>>>>> >>> >>> what should I do if I want to use IOC in my panels? In short I 
>>>>>> >>> >>> need
>>>>>> a
>>>>>> >>> >>> sort of a provider injected into a panel, what's the prettiest 
>>>>>> >>> >>> way
>>>>>> to
>>>>>> >>> >>> do it?
>>>>>> >>> >>>
>>>>>> >>> >>> regards Nino
>>>>>> >>> >>>
>>>>>> >>> >>>
>>>>>> ---------------------------------------------------------------------
>>>>>> >>> >>> 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
>>>>>> >
>>>>>> >
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> 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
>
>

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

Reply via email to