Return-Path: X-Original-To: apmail-wicket-users-archive@minotaur.apache.org Delivered-To: apmail-wicket-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8A53918975 for ; Sun, 3 May 2015 06:57:24 +0000 (UTC) Received: (qmail 98627 invoked by uid 500); 3 May 2015 06:57:23 -0000 Delivered-To: apmail-wicket-users-archive@wicket.apache.org Received: (qmail 98582 invoked by uid 500); 3 May 2015 06:57:23 -0000 Mailing-List: contact users-help@wicket.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@wicket.apache.org Delivered-To: mailing list users@wicket.apache.org Received: (qmail 98571 invoked by uid 99); 3 May 2015 06:57:23 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 May 2015 06:57:23 +0000 Received: from mail-oi0-f43.google.com (mail-oi0-f43.google.com [209.85.218.43]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 6D1ED1A0443 for ; Sun, 3 May 2015 06:57:23 +0000 (UTC) Received: by oiko83 with SMTP id o83so93860715oik.1 for ; Sat, 02 May 2015 23:57:22 -0700 (PDT) X-Received: by 10.60.156.233 with SMTP id wh9mr2866158oeb.84.1430636242566; Sat, 02 May 2015 23:57:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.106.165 with HTTP; Sat, 2 May 2015 23:56:42 -0700 (PDT) In-Reply-To: <45076235-1B7B-46CE-A053-AB8307D6235A@gmx.at> References: <32D16290-C36C-493E-BC96-1B00963FDFE9@gmx.at> <45076235-1B7B-46CE-A053-AB8307D6235A@gmx.at> From: Martin Grigorov Date: Sun, 3 May 2015 09:56:42 +0300 Message-ID: Subject: Re: handling non serializable objects To: "users@wicket.apache.org" Content-Type: multipart/alternative; boundary=089e011832cc0a865f051527f5ca --089e011832cc0a865f051527f5ca Content-Type: text/plain; charset=UTF-8 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 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 : > > > > 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" 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: users-unsubscribe@wicket.apache.org > >> For additional commands, e-mail: users-help@wicket.apache.org > >> > >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org > For additional commands, e-mail: users-help@wicket.apache.org > > --089e011832cc0a865f051527f5ca--