How to I get an un-proxied Spring Bean ?

2010-12-14 Thread smallufo
I have a page with such definition : public class CrudPageT extends Serializable extends WebPage { public CrudPage(PageParameters pps , AbstractDaoT dao) {...} } and here is how I initialize the page : CrudPageUser page = new CrudPageUser(pps , userDao); the userDao is a Spring injected DAO

Re: How to I get an un-proxied Spring Bean ?

2010-12-14 Thread Pedro Santos
proxyClass.getSuperclass() gives you the dao type On Tue, Dec 14, 2010 at 8:45 AM, smallufo small...@gmail.com wrote: I have a page with such definition : public class CrudPageT extends Serializable extends WebPage { public CrudPage(PageParameters pps , AbstractDaoT dao) {...} } and

Re: How to I get an un-proxied Spring Bean ?

2010-12-14 Thread James Carman
You could also have AbstractDao have a method like this: public T ClassT getEntityType(); I assume you need the type in your DAO when constructing queries, so you probably already have that set up somewhere. On Tue, Dec 14, 2010 at 5:45 AM, smallufo small...@gmail.com wrote: I have a page with

Re: How to I get an un-proxied Spring Bean ?

2010-12-14 Thread smallufo
Hi , I tried : dao.getClass() = class org.apache.wicket.proxy.$Proxy101 dao.getClass().getGenericSuperclass() = class java.lang.reflect.Proxy dao.getClass().getSuperclass() = class java.lang.reflect.Proxy But still unable to get the dao class 2010/12/14 Pedro Santos pedros...@gmail.com

Re: How to I get an un-proxied Spring Bean ?

2010-12-14 Thread Igor Vaynberg
keep calling superclass until its not a proxy -igor On Tue, Dec 14, 2010 at 3:28 PM, smallufo small...@gmail.com wrote: Hi , I tried : dao.getClass() = class org.apache.wicket.proxy.$Proxy101 dao.getClass().getGenericSuperclass() = class java.lang.reflect.Proxy