to 11. heinäk. 2024 klo 16.54 Tobias Gierke
(tobias.gie...@voipfuture.com.invalid) kirjoitti:

>
> On 11.07.24 15:31, Emond Papegaaij wrote:
> > Op do 11 jul 2024 om 15:09 schreef Sven Meier <s...@meiers.net>:
> >
> >> the ListItemModel does not hold a reference to the model of the
> >> ListView, so it's not its responsibility to detach it.
> >>
> > IMHO, the implementation of ListItemModel is strange. It does not hold a
> > direct reference to the model of the ListView, but it holds a reference
> to
> > the ListView instead. It also has a dependency on the model object (and
> > hence the model of) the ListView. I don't think models should hold
> > references to components, it should be the other way around. I think
> > ListItemModel should be reworked to take a reference to the model of the
> > ListView.
> >
> > Rule of thumb: if you hold a reference to a model, you have to detach it.
> >
> >
> > I would say: if reading the object of model X requires reading the
> objects
> > of other models, the detach of model X should also detach those other
> > models.
> FWIW, I second this - I also recently came across this somewhat
> surprising behavior.
>

IMO ListItemModel is more of a Lense than a model ;) Rename perhaps?

**
Martin



>
> Regards,
> Tobias
> >
> > Best regards,
> > Emond
> >
> --
> Tobias Gierke
> Software Developer
>
> Voipfuture GmbH   Wendenstr. 4   20097 Hamburg   Germany
> Phone +49 40 688 9001 64   Fax +49 40 688 9001 99
> Managing Directors   Jan Bastian   Eyal Ullert
> Commercial Court AG Hamburg   HRB 109896   VAT ID DE263738086
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to