Hi, Please show us how A instance is being created.
Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Sat, May 2, 2015 at 11:32 PM, Chris <[email protected]> wrote: > Hi Martin, > > I have a page with a field of type A that is set over a broadcast event. > Class A has a dao which is injected via constructor. > The field dao cannot be serializable. How could I change this so a proxy > is injected? > > Thanks! > > Page { > > A a; > > public void onEvent(IEvent<?> event) { > super.onEvent(event); > > if (event.getPayload() instanceof Item) { > Item update = (Item) event.getPayload(); > a = update.getA(); > > } > > A implements Serializable { > > private Dao dao; > > @Autowired > public A(Dao dao) { > this.dao = dao; > } > > } > > > > Am 02.05.2015 um 21:28 schrieb Martin Grigorov <[email protected]>: > > > > Hi, > > > > Injected how? > > wicket-spring and -guice inject serializable proxies so there is no such > > issue with them > > On May 2, 2015 10:26 PM, "Chris" <[email protected]> wrote: > > > >> Hi all, > >> > >> what is the best approach to handle non-serializable objects in Wicket > >> pages? E.g. when an object has a DAO injected and this object is a > field of > >> a Wicket page? > >> > >> Thanks a lot, > >> Chris > >> --------------------------------------------------------------------- > >> 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] > >
