Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [riena-dev] 264325 - NoSuchMethodException and POJOs

Hi everybody!

first, thanks Carsten, I had forgotten about 263031.

I think the best way to answer your question is as follows: I will
provide a patch to 264325 following your suggestion of changing to
PojoObservables in the affected ridgets. This will allow me to
evaluate these changes against our tests and also other people to
provide feedback.

In principle I like your idea, since the Ridgets already assume that
the model is a POJO anyway. The binding only synchronizes
automatically from UI to model. For the other direction one has to
invoke ridget#updateFromModel. That means that the ridgets do not need
change notifications from the model and chaning to PojoObservables
should not create any problems (but  see next paragraph).

There are a few cases where I see advantages for having beans, namely
the more complex ridgets, such as tree / table / treetable. Currently,
if the element for each row of a table is a bean, the content of the
row / column (i.e. labels) will update automatically when changed. The
same applies to structural changes (add/remove) if you do them by
calling WritableList.add/remove -- they are updated instantly without
#updateFromModel(). I would like to preserve this behavior -- which
means that those ridgets should use bean observables on beans and pojo
observables on pojos.

@ekke: by the way it is possible to use BeansObservables in any case,
via the alternative #bindToModel (...) method -- usually
ridget#bindToModel(observablevalue, ...) or
#bindToModel(observablelist, ...).

Elias.

PS: related: riena commiters, do you think we could get rid of the
UnboundPropertyWritableList in a future step? I don't quite understand
why we need this anymore. I believe it was added as a workaround for
some older databinding issues?



On Sun, Feb 22, 2009 at 11:22 PM, Drossel, Carsten
<Carsten.Drossel@xxxxxxxxxxxx> wrote:
> Hi Elias,
>
> couldn't we switch to PojoObservables internally? (see
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=263031 )
>
> Greetings,
> Carsten


Back to the top