Well, Wicket is an unmanaged framework, so you're going to have a hard
time getting it to use spring to instantiate and inject beans for you.
However, you can move this proxy creation logic up into a superclass
if you wish:
public class BasePage extends WebPage
{
protected Object springProxy(Class beanType)
{
...
}
protected Object springProxy(Class beanType, String beanName)
{
...
}
}
That might clean up your code a bit. You'd probably have to do a
little more homework to get unit tests to work properly, though.
On Fri, Sep 12, 2008 at 3:52 PM, Agent Mahone <[EMAIL PROTECTED]> wrote:
> Thanks for ur quick response.
> I already read this article. But I don´t like this approach calling this
> creation Proxy stuff when I need it for
> from a Wicket-Bean.
>
>
> private ContactDao dao = LazyInitProxyFactory.createProxy(ContractDao.class,
> new IProxyTargetLocator() {
> public Object locateProxyTarget() {
> return
> ((MyApplication)Application.get()).getSpringContext().getBean("contactDao");
> }
> }
> }
> I´m knew to it and I´m struggeling for the right solution.
> Is there no possibility to tell spring or wicket to do that in the background.
>
> I´m just don´t want to care about it... is it now a dao bean or simple bean
> or this special kind of wicket bean which I have to instantiate in another
> way.
>
> What I want is simple to set this stuff in the applicationContext file.
>
> And that spring does the injection throug the "setter-method".
>
> Thanks in advance for ur comments.
> I apprciate it very much.
>
> Cheers Phil
>
> __________________________________________________
> Do You Yahoo!?
> Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz
> gegen Massenmails.
> http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]