Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » [DataBinding] Model objects as JavaBeans question
[DataBinding] Model objects as JavaBeans question [message #314735] Sat, 21 April 2007 06:12 Go to next message
Eclipse UserFriend
Hi,

I am wondering what is the most appropriate method for implementing
model objects to be used with JFace data binding framework.

Till this moment I was using POJOs that were persisted either via
Hibernate or db4o. I tried to keep my beans as simple as possible i.e.
to contain mostly properties. Now, since it is a requirement for
BeansObservables to work correctly, my model objects should (?) have
property change support. That requires that all model objects either
extend or implement on their own all the code related to property change
listeners. Now here comes my question: what is the most proper
(suggested) way to do that? It seems that including property change
support in the model is not necessary correct way to do that?

Any suggestions?

/p
Re: [DataBinding] Model objects as JavaBeans question [message #314739 is a reply to message #314735] Sun, 22 April 2007 01:08 Go to previous messageGo to next message
Eclipse UserFriend
> Now, since it is a requirement for
> BeansObservables to work correctly, my model objects should (?) have
> property change support.

You don't have to include property change support but if you want to
synchronize the target to the model when the model changes you'll need
to provide property change support. We log messages if we can't find
the appropriate methods to attach listeners. But we don't throw an
exception or terminate the creation of the observable.

> That requires that all model objects either
> extend or implement on their own all the code related to property change
> listeners. Now here comes my question: what is the most proper
> (suggested) way to do that? It seems that including property change
> support in the model is not necessary correct way to do that?

I'm not sure I'm following. Why wouldn't it be correct?

-brad
Re: [DataBinding] Model objects as JavaBeans question [message #314740 is a reply to message #314739] Sun, 22 April 2007 02:30 Go to previous messageGo to next message
Eclipse UserFriend
Brad Reynolds wrote:

>
>> That requires that all model objects either extend or implement on
>> their own all the code related to property change listeners. Now here
>> comes my question: what is the most proper (suggested) way to do that?
>> It seems that including property change support in the model is not
>> necessary correct way to do that?
>
> I'm not sure I'm following. Why wouldn't it be correct?

I just do not know. My applications so far were rather simple and due
to this fact model was simple (no listeners) as well.

Now I know there is nothing incorrect about it. ;-)

Thx Brad.

/p

>
> -brad
Re: [DataBinding] Model objects as JavaBeans question [message #314741 is a reply to message #314740] Sun, 22 April 2007 06:02 Go to previous message
Eclipse UserFriend
Hi,

You can explore here the power from AspectOriented-Java you could inject
PropertyChangeSupport using (http://www.eclipse.org/ajdt/,
http://www.eclipse.org/aspectj/) and keep your really programm code as
simple as possible.

Tom

Przemyslaw Rudzki schrieb:
> Brad Reynolds wrote:
>
>>
>>> That requires that all model objects either extend or implement on
>>> their own all the code related to property change listeners. Now here
>>> comes my question: what is the most proper (suggested) way to do
>>> that? It seems that including property change support in the model is
>>> not necessary correct way to do that?
>>
>> I'm not sure I'm following. Why wouldn't it be correct?
>
> I just do not know. My applications so far were rather simple and due
> to this fact model was simple (no listeners) as well.
>
> Now I know there is nothing incorrect about it. ;-)
>
> Thx Brad.
>
> /p
>
>>
>> -brad
Previous Topic:How to get SyncInfo
Next Topic:[DataBinding] binding a list of objects to group of checkboxes
Goto Forum:
  


Current Time: Sun May 11 06:25:55 EDT 2025

Powered by FUDForum. Page generated in 0.03526 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top