Thanks for your reply. I think I can (at least partially) understand
your position and think there aren't any new arguments here I can
mention. So the discussions seems to be at an end here.
Maybe it is a matter of taste... If I find any time, I will create a
patch...
Regards,
Johannes
On Sat,
you are right, the components that just read a collection do just
that, read it. they simply ignore the setter method in imodel. no big
deal, just because you are given an interface doesnt mean you have to
use all the methods in it. thus abstractreadonlymodel.
however, a lot of components manipula
> i think "misuse" is a pretty bold word considering you are talking to
> people who designed and built imodel, dont you think? :)
Well, I think you are right. Sorry for that.
I just mean, that it has a bad smell here...
>
> if we do what you suggest then we would end up with:
>
> interface im
On Sat, Mar 7, 2009 at 10:15 AM, Johannes Schneider
wrote:
>
> > setobject is still called on the model, but is called with the same
> > instance of collection. this is necessary so that if you have a model
> > that translates a collection of one type to a collection of another
> > can perform the
On Wed, 2009-03-04 at 09:14 -0800, Igor Vaynberg wrote:
> components that deal with collections in wicket always reuse the same
> instance of collection is one was provided where it makes sense.
Yes, and therefore a setter is not necessary.
> setobject is still called on the model, but is called
On Wed, 2009-03-04 at 08:27 -0800, Scott Swank wrote:
> Does AbstractReadOnlyModel accomplish what you're talking about?
Not really. I suggest a separate interface that does not extend IModel.
Instead IModel should extend that one (since it adds the setter)...
And of course that interface should
components that deal with collections in wicket always reuse the same
instance of collection is one was provided where it makes sense.
setobject is still called on the model, but is called with the same
instance of collection. this is necessary so that if you have a model
that translates a collect
Does AbstractReadOnlyModel accomplish what you're talking about?
Scott
On Wed, Mar 4, 2009 at 4:50 AM, Johannes Schneider
wrote:
> Hi,
>
> the concept of IModel seems to be very obvious. It is simply some kind
> of reference and offers a getter and a setter.
>
> When used with ordinary object, e
Hi,
the concept of IModel seems to be very obvious. It is simply some kind
of reference and offers a getter and a setter.
When used with ordinary object, everything works fine. An IModel that
contains a String can easily be mapped to a TextField.
The text field calls "getObject" to show the initi