You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by René Stolle <st...@posteo.de> on 2019/08/28 18:49:45 UTC
non-serializable objects to feed a DropDownChoice
Hello there,
my domain classes are mostly not serializable. Making use of
LoadableDetachableModels I have no problems execpt of one situtation: I
couldn't find an easy solution to place a list of domain objects in a
DropDownChoice without getting serialization issues. The examples I
found ignore this problem and I have only a pretty complicated work
around. My domain classes have an id of type long (serializeable), which
I use in my solution. This works, but the code confuses me everytime I
have to touch it.
My question now, how is this done the "wicket way" ? Is there an elegant
solution out there?
René
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: non-serializable objects to feed a DropDownChoice
Posted by Francois Meillet <fr...@gmail.com>.
Why don't you use a pojo that could be a simplified view of your domain class (dto) ?
François
> Le 28 août 2019 à 20:49, René Stolle <st...@posteo.de> a écrit :
>
> Hello there,
>
> my domain classes are mostly not serializable. Making use of LoadableDetachableModels I have no problems execpt of one situtation: I couldn't find an easy solution to place a list of domain objects in a DropDownChoice without getting serialization issues. The examples I found ignore this problem and I have only a pretty complicated work around. My domain classes have an id of type long (serializeable), which I use in my solution. This works, but the code confuses me everytime I have to touch it.
>
> My question now, how is this done the "wicket way" ? Is there an elegant solution out there?
>
> René
>
> ---------------------------------------------------------------------
> 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
Re: non-serializable objects to feed a DropDownChoice
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
Is there a problem in using LoadableDetachableModel<List<YourEntity>> for
the DropDownChoice ?
Use this constuctor:
public DropDownChoice(String id, IModel<T> model, IModel<? extends List<?
extends T>> choices, IChoiceRenderer<? super T> renderer)
On Wed, Aug 28, 2019 at 10:56 PM René Stolle <st...@posteo.de> wrote:
> Hello there,
>
> my domain classes are mostly not serializable. Making use of
> LoadableDetachableModels I have no problems execpt of one situtation: I
> couldn't find an easy solution to place a list of domain objects in a
> DropDownChoice without getting serialization issues. The examples I
> found ignore this problem and I have only a pretty complicated work
> around. My domain classes have an id of type long (serializeable), which
> I use in my solution. This works, but the code confuses me everytime I
> have to touch it.
>
> My question now, how is this done the "wicket way" ? Is there an elegant
> solution out there?
>
> René
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>