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
>
>

Reply via email to