What do you mean by non wicket files? Why do you need the
ApplicationContext?
If you just want to have your dependencies injected in a non Component class
you could use InjectHolder.getInjector().inject(objectToWire) and pass in
the Object you want to get wired. You should also annotate the properties
you want to wire with the @SpringBean annotation.
Example:
class NonWicketClass {
@SpringBean private SomeBean someBean;
public NonWicketClass() {
InjectorHolder.getInjector().inject(this);
}
}
Lars
On Wed, Apr 9, 2008 at 9:25 PM, Edvin Syse <[EMAIL PROTECTED]> wrote:
> .. or just implement ApplicationContextAware ofcourse :)
>
> -- Edvin
>
> Edvin Syse skrev:
>
> Pinger wrote:
> >
> > > All the examples I see do something like
> > >
> > >
> > > WebApplicationContext ctx =
> > > WebApplicationContextUtils.getRequiredWebApplicationContext(
> > > this.getServletContext());
> > >
> > > how do I do the this.getServletContext() when I am not in the wicket
> > > file?
> > >
> >
> > Maybe you could implement ServletContextAware?
> >
> > -- Edvin
> >
> > ---------------------------------------------------------------------
> > 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]
>
>