wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From francois meillet <francois.meil...@gmail.com>
Subject Re: Select, Option and equals()
Date Tue, 29 Jan 2013 15:04:47 GMT
You can do that by using the decorator pattern : write a wrapper for the
object and redefine equals and hashcode.
Fran├žois

On Tue, Jan 29, 2013 at 2:38 PM, Sven Meier <sven@meiers.net> wrote:

> Hi all,
>
> I'm using Select/SelectOptions with model-objects that have a semantic
> equality but their #equals() method is not overriden :/.
>
> What is the recommended way to the have the correct option preselected,
> given that I cannot add #equals() to the implementation?
> Select#isSelected() has package access only, Select#compareModels() uses
> #equals() on the model-object and is private currently.
>
> Thanks
> Sven
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<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