wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Grigorov <mgrigo...@apache.org>
Subject Re: handling non serializable objects
Date Sun, 03 May 2015 06:56:42 GMT
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 <chris.gr@gmx.at> 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 <mgrigorov@apache.org>:
> >
> > 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" <chris.gr@gmx.at> 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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message