Hi,
On Wed, Jan 29, 2014 at 9:15 AM, Michael Mosmann <[email protected]> wrote:
> Hi,
>
> As one might know I did some refactoring in this direction. What we can
> expect is some trouble with defaultModel in Component. There are different
> kind of ways to solve this, but it will come with cost.
> - remove default model from component
> - make component generic
> - make some bigger changes to it
Yes, I also imagine bigger API changes to accomplish this.
Both the old discussion [1] and Martijn suggest to change Label to use read
only model.
I see several problems with this:
- I won't be able to push new object into the Label's model.
Usually one needs readonly model, like ResourceModel, but there are cases
when you need to do: label.setModelObject("new")
- o.a.w.Component as the base class for all components doesn't know what
type of model the specialization will need, so it's signature will have to
use a base model class. What is the base for IReadableModel and
IWriteableModel ?!
- currently IModel is also IDetachable
I am not sure that lambda's in Java 8 will work here unless we remove
IDetachable from the base imodel interface and add it to each
implementation.
So, at the moment I cannot fully imagine such change. But maybe there is a
clean way ..
1. http://markmail.org/message/iu4wrn5clyibacro
>
>
> m:)
>
>
> So I'm +1 for this, as long as we aren't missing any major obstacles
>> here.
>> Carl-Eric
>>
>>
>>
>