You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Martijn Dashorst <ma...@gmail.com> on 2007/06/06 17:50:44 UTC

CompoundPropertyModel#detach should check for IDetachable instead of IModel

All,

I'm not sure the usecase is general, but in our application we have a
couple of classes that implement IDetachable, but not IModel, and
these are put into a CompoundPropertyModel

The thing is that the CompoundPropertyModel does an instanceof check
for IModel instead of the slightly more general IDetachable.

Are there any objections to changing that check to IDetachable instead
of IModel?

Martijn

-- 
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.6 contains a very important fix. Download Wicket now!
http://wicketframework.org

Re: CompoundPropertyModel#detach should check for IDetachable instead of IModel

Posted by Johan Compagner <jc...@gmail.com>.
fine by me 
i think its a bit better why test for  more if you call on less...

On 6/6/07, Martijn Dashorst <ma...@gmail.com> wrote:
> All,
>
> I'm not sure the usecase is general, but in our application we have a
> couple of classes that implement IDetachable, but not IModel, and
> these are put into a CompoundPropertyModel
>
> The thing is that the CompoundPropertyModel does an instanceof check
> for IModel instead of the slightly more general IDetachable.
>
> Are there any objections to changing that check to IDetachable instead
> of IModel?
>
> Martijn
>
> --
> Join the wicket community at irc.freenode.net: ##wicket
> Wicket 1.2.6 contains a very important fix. Download Wicket now!
> http://wicketframework.org
>

Re: CompoundPropertyModel#detach should check for IDetachable instead of IModel

Posted by Eelco Hillenius <ee...@gmail.com>.
On 6/6/07, Martijn Dashorst <ma...@gmail.com> wrote:
> All,
>
> I'm not sure the usecase is general, but in our application we have a
> couple of classes that implement IDetachable, but not IModel, and
> these are put into a CompoundPropertyModel
>
> The thing is that the CompoundPropertyModel does an instanceof check
> for IModel instead of the slightly more general IDetachable.
>
> Are there any objections to changing that check to IDetachable instead
> of IModel?

Not from me.

Eelco

Re: CompoundPropertyModel#detach should check for IDetachable instead of IModel

Posted by Martijn Dashorst <ma...@gmail.com>.
I've scanned other models as well, and will apply this to
AbstractPropertyModel too.

I also included/created a unit test for this issue.

See http://issues.apache.org/jira/browse/WICKET-621

Martijn

On 6/6/07, Martijn Dashorst <ma...@gmail.com> wrote:
> All,
>
> I'm not sure the usecase is general, but in our application we have a
> couple of classes that implement IDetachable, but not IModel, and
> these are put into a CompoundPropertyModel
>
> The thing is that the CompoundPropertyModel does an instanceof check
> for IModel instead of the slightly more general IDetachable.
>
> Are there any objections to changing that check to IDetachable instead
> of IModel?
>
> Martijn
>
> --
> Join the wicket community at irc.freenode.net: ##wicket
> Wicket 1.2.6 contains a very important fix. Download Wicket now!
> http://wicketframework.org
>


-- 
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.6 contains a very important fix. Download Wicket now!
http://wicketframework.org