Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » SWT Database widgets
SWT Database widgets [message #2002] Fri, 14 October 2005 10:43 Go to next message
Bahadir Yagan is currently offline Bahadir YaganFriend
Messages: 21
Registered: July 2009
Junior Member
Hi,

I wonder if DTP project includes data aware widgets for SWT.

(ie: A Table that is associated with a JDBC resultset or a combo
displaying all values of a data column)

Regards,

Bahadir
Re: SWT Database widgets [message #2017 is a reply to message #2002] Fri, 14 October 2005 13:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jograham.sybase.com

Bahadir Yagan wrote:

> Hi,

> I wonder if DTP project includes data aware widgets for SWT.

> (ie: A Table that is associated with a JDBC resultset or a combo
> displaying all values of a data column)

> Regards,

> Bahadir

Hi Bahadir,

At the moment DTP does not, but I think that people working on the Visual
Editor (VE) project here at Eclipse have been looking at this area. I will
make them aware of this post, and perhaps they can then provide more
information.

Regards,
John Graham
Eclipse Data Tools Platform Project PMC
Re: SWT Database widgets [message #2032 is a reply to message #2002] Fri, 14 October 2005 14:49 Go to previous messageGo to next message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Bahadir Yagan wrote:
> Hi,
>
> I wonder if DTP project includes data aware widgets for SWT.
>
> (ie: A Table that is associated with a JDBC resultset or a combo
> displaying all values of a data column)

Hi Bahandir,

VE and JFace have been working together to provide data binding for
Eclipse. I expect that we will ship an early preview in either next
milestone build or the one after that.


Best,

Dave Orme

--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
http://xswt.sf.net -- XML-based SWT page description language
Re: SWT Database widgets [message #2046 is a reply to message #2032] Tue, 18 October 2005 11:17 Go to previous messageGo to next message
Bahadir Yagan is currently offline Bahadir YaganFriend
Messages: 21
Registered: July 2009
Junior Member
Hi,

Thanks. I checked-out the sources from CVS. I will try it when I got time.

I think this is a quite important feature for Eclipse and VE. I was
helping a friend to use Java, who has previous experience in .NET. It
was a bad thing to say that there is no Grid widget.



David J. Orme wrote:
> Bahadir Yagan wrote:
>> Hi,
>>
>> I wonder if DTP project includes data aware widgets for SWT.
>>
>> (ie: A Table that is associated with a JDBC resultset or a combo
>> displaying all values of a data column)
>
> Hi Bahandir,
>
> VE and JFace have been working together to provide data binding for
> Eclipse. I expect that we will ship an early preview in either next
> milestone build or the one after that.
>
>
> Best,
>
> Dave Orme
>
Re: SWT Database widgets [message #2059 is a reply to message #2046] Thu, 20 October 2005 18:56 Go to previous messageGo to next message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Bahadir Yagan wrote:
> Hi,
>
> Thanks. I checked-out the sources from CVS. I will try it when I got time.

Excellent.

Heads-up: we've moved over to Platform, which is where our latest work
is happening. Check out org.eclipse.jface.binding and friends. But be
advised that data binding API is still changing on nearly a daily basis
right now.

> I think this is a quite important feature for Eclipse and VE. I was
> helping a friend to use Java, who has previous experience in .NET. It
> was a bad thing to say that there is no Grid widget.

Re: Grid widget.

Look for CompositeTable and CompositeTableTest in the
org.eclipse.ve.sweet project.

I think that's what you want. It's modeless (no more click to edit),
lets you put any SWT control in any column, and is designed to be used
efficiently with the Visual Editor--something your friend with Microsoft
platform experience will appreciate.

It's designed so that it can work with any data binding framework, so
although everything is still internal API, CompositeTable isn't likely
to change much.


Best regards,

Dave Orme
--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
http://xswt.sf.net -- XML-based SWT page description language
Re: SWT Database widgets [message #2073 is a reply to message #2059] Thu, 20 October 2005 23:45 Go to previous messageGo to next message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
David,
i have any questions :
1) 'friends' are o.e.jface.examples.binding and o.e.jface.tests.binding
Are there yet one ?
2) Is o.e.ve.sweet deprecated ?
3) Is there nested bindings, for example , bind to person.address.street
4) Is there validation framework ?

i work rcp application with spring-rcp bindings (yes, swing control in rcp
view) and use swing because
- swt haven't good binding framework (with nested binding for ORM/hibernate
POJO)
- swing JTable (and swingx JXTable) is better than swt Table (model can be
list, header mouse event management, resizing and hiding column etc)

Thanks

David J. Orme wrote:

> Bahadir Yagan wrote:
>> Hi,
>>
>> Thanks. I checked-out the sources from CVS. I will try it when I got
>> time.
>
> Excellent.
>
> Heads-up: we've moved over to Platform, which is where our latest work
> is happening. Check out org.eclipse.jface.binding and friends. But be
> advised that data binding API is still changing on nearly a daily basis
> right now.
>
Re: SWT Database widgets [message #3292 is a reply to message #2073] Mon, 24 October 2005 14:56 Go to previous messageGo to next message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Haris Peco wrote:
> David,
> i have any questions :
> 1) 'friends' are o.e.jface.examples.binding and o.e.jface.tests.binding
> Are there yet one ?

That's all of them (for now).

> 2) Is o.e.ve.sweet deprecated ?

Not exactly; just out of date. Stuff in o.e.ve.sweet is gradually being
migrated into o.e.jface.binding.

> 3) Is there nested bindings, for example , bind to person.address.street

Yes, but not that way. There are validation framework issues with doing
that when you've got 1:m relationships going on.

> 4) Is there validation framework ?

Yes.

> i work rcp application with spring-rcp bindings (yes, swing control in rcp
> view) and use swing because
> - swt haven't good binding framework (with nested binding for ORM/hibernate
> POJO)
> - swing JTable (and swingx JXTable) is better than swt Table (model can be
> list, header mouse event management, resizing and hiding column etc)

Understood. We're obviously working hard to change this situation and
would love to have folks' help testing things as soon as we have
stabilized our API...


Best regards,

Dave Orme

--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
http://xswt.sf.net -- XML-based SWT page description language
Re: SWT Database widgets [message #3324 is a reply to message #3292] Mon, 24 October 2005 18:41 Go to previous messageGo to next message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
>
>> i work rcp application with spring-rcp bindings (yes, swing control in
>> rcp
>> view) and use swing because
>> - swt haven't good binding framework (with nested binding for
>> ORM/hibernate POJO)
>> - swing JTable (and swingx JXTable) is better than swt Table (model can
>> be list, header mouse event management, resizing and hiding column etc)
>
> Understood. We're obviously working hard to change this situation and
> would love to have folks' help testing things as soon as we have
> stabilized our API...
>
>
i would like test, but nested properties binding is very important for me
i don't accept jgoodies binding because haven't nested properties.
spring rcp have perfect binding - there is plan for swing independent
binding framework
i explore jface binding more
Thanks
Re: SWT Database widgets [message #3356 is a reply to message #3324] Mon, 24 October 2005 16:59 Go to previous messageGo to next message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Haris Peco wrote:
> i would like test, but nested properties binding is very important for me
> i don't accept jgoodies binding because haven't nested properties.
> spring rcp have perfect binding - there is plan for swing independent
> binding framework
> i explore jface binding more

Thanks for the feedback. Here are the issues I have uncovered with
nested property binding. Imagine a table control that is editing a
Customer object with an embeded Address object. Then the following must
be true:

1) Validation has to cascade to the nested objects. This is tricky to
get right.

2) Creating new objects may be tricky, depending on the back-end. Do
you need to register the new Address object with the persistence layer,
for example? If the Address object is reachable from multiple places in
your object graph, how do you make sure that all the object references
are correctly initialized.

3) The reverse of (2): When you're deleting a Customer object (okay, you
probably wouldn't ever delete a customer object, but suppose that this
is the kind of object you would delete), whose responsibility is it to
make sure that all references to the Customer object and its Address
object are correctly released?

How does Spring binding handle this? How would you like it to be done?


Best,

Dave Orme

--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
http://xswt.sf.net -- XML-based SWT page description language
Re: SWT Database widgets [message #3422 is a reply to message #3356] Mon, 24 October 2005 19:54 Go to previous message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
David J. Orme wrote:

> Haris Peco wrote:
>> i would like test, but nested properties binding is very important for me
>> i don't accept jgoodies binding because haven't nested properties.
>> spring rcp have perfect binding - there is plan for swing independent
>> binding framework
>> i explore jface binding more
>
> Thanks for the feedback. Here are the issues I have uncovered with
> nested property binding. Imagine a table control that is editing a
> Customer object with an embeded Address object. Then the following must
> be true:
>
> 1) Validation has to cascade to the nested objects. This is tricky to
> get right.
>

no, i don't agree.i want validation for bind properties only
for example, if i bind properties customer.address.street then i want
validation only for street in address object
in spring rcp we declare validation for object and properties and it isn't
important where obejcts is used
it isn't perfect because i can do validation but i can't suppress property
change.for example, if field is integer and i type 'a' then spring do
validation and return error, but show 'a' in visual field - i have
workaround for this and my suggestion isn't accepted from spring rcp

> 2) Creating new objects may be tricky, depending on the back-end. Do
> you need to register the new Address object with the persistence layer,
> for example? If the Address object is reachable from multiple places in
> your object graph, how do you make sure that all the object references
> are correctly initialized.
new spring rcp handle null object properties, but i don't use it
i have base bean for form, always and when i create bean object i create
empty object for object's properties automatic with reflection (with
BeanWrapper class from spring framework) - i do it only for bind properties
for example, if i bind customer.address.street (base form bean is customer)
i create empty bean address (empty is one created with no-constructor
argument) - if i don't bind address anywhere then i don't create address

simple, i expect from binding next : when change property visual class i
want that binding framework change bean properties automatic - inverse
change (change bean properties) change visual class only with special call
(value model) - we can't bidirectional changes without listener on setter
and it isn't important (i don't want listeners in POJO - this can be
resolved with AOP, but it is unnecessary) - i change bean properties with
value model
after every changes bean properties framework do validation (i can cancel
validation) - i cancel validation when user search database - user can type
'1%' in integer field for search all rows start with '1' and i don't want
validation for this
> 3) The reverse of (2): When you're deleting a Customer object (okay, you
> probably wouldn't ever delete a customer object, but suppose that this
> is the kind of object you would delete), whose responsibility is it to
> make sure that all references to the Customer object and its Address
> object are correctly released?
>
> How does Spring binding handle this? How would you like it to be done?
>
yes, i want delete (this is database application) and i don't delete
address.
this is many-to-one relation and deleting base object don't delete nested
objects.spring rcp do nothing and it isn't important for me
all crud operation (insert,delete,update,select) are in model and it is
independent from binding
spring rcp have helper method (in form model) setFormObject and i use it for
setting new object after crud operations

spring rcp do next for me :

when i bind visual class A to bean property propA (can be nested) then
every change visual class contents (user type text or choose combo etc)
change bean properties
setting bean properties work with special interface only, like

ValueModel model = formModel.getValueModel("propA");
model.setValue(value);

this construction change contents visual class, but simple
customer.setPropA(value);
change only bean property

formModel.setFormObject(customer)
change all visual classes bind with bean 'customer'

framework do validation automatic, but I can call
formModel.setValidation(false)
or
formModel.validate()

settings validation : i create rules declarative with bean objects and
properties (i add automatic validation for required fields from database or
foreign and primary keys etc, too , but this is part of my framework)

Thanks
Re: SWT Database widgets [message #3455 is a reply to message #3422] Mon, 24 October 2005 18:31 Go to previous message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Thanks for your feedback.


Best,

Dave Orme

Haris Peco wrote:
> David J. Orme wrote:
>
>
>>Haris Peco wrote:
>>
>>>i would like test, but nested properties binding is very important for me
>>>i don't accept jgoodies binding because haven't nested properties.
>>>spring rcp have perfect binding - there is plan for swing independent
>>>binding framework
>>>i explore jface binding more
>>
>>Thanks for the feedback. Here are the issues I have uncovered with
>>nested property binding. Imagine a table control that is editing a
>>Customer object with an embeded Address object. Then the following must
>>be true:
>>
>>1) Validation has to cascade to the nested objects. This is tricky to
>>get right.
>>
>
>
> no, i don't agree.i want validation for bind properties only
> for example, if i bind properties customer.address.street then i want
> validation only for street in address object
> in spring rcp we declare validation for object and properties and it isn't
> important where obejcts is used
> it isn't perfect because i can do validation but i can't suppress property
> change.for example, if field is integer and i type 'a' then spring do
> validation and return error, but show 'a' in visual field - i have
> workaround for this and my suggestion isn't accepted from spring rcp
>
>
>>2) Creating new objects may be tricky, depending on the back-end. Do
>>you need to register the new Address object with the persistence layer,
>>for example? If the Address object is reachable from multiple places in
>>your object graph, how do you make sure that all the object references
>>are correctly initialized.
>
> new spring rcp handle null object properties, but i don't use it
> i have base bean for form, always and when i create bean object i create
> empty object for object's properties automatic with reflection (with
> BeanWrapper class from spring framework) - i do it only for bind properties
> for example, if i bind customer.address.street (base form bean is customer)
> i create empty bean address (empty is one created with no-constructor
> argument) - if i don't bind address anywhere then i don't create address
>
> simple, i expect from binding next : when change property visual class i
> want that binding framework change bean properties automatic - inverse
> change (change bean properties) change visual class only with special call
> (value model) - we can't bidirectional changes without listener on setter
> and it isn't important (i don't want listeners in POJO - this can be
> resolved with AOP, but it is unnecessary) - i change bean properties with
> value model
> after every changes bean properties framework do validation (i can cancel
> validation) - i cancel validation when user search database - user can type
> '1%' in integer field for search all rows start with '1' and i don't want
> validation for this
>
>>3) The reverse of (2): When you're deleting a Customer object (okay, you
>>probably wouldn't ever delete a customer object, but suppose that this
>>is the kind of object you would delete), whose responsibility is it to
>>make sure that all references to the Customer object and its Address
>>object are correctly released?
>>
>>How does Spring binding handle this? How would you like it to be done?
>>
>
> yes, i want delete (this is database application) and i don't delete
> address.
> this is many-to-one relation and deleting base object don't delete nested
> objects.spring rcp do nothing and it isn't important for me
> all crud operation (insert,delete,update,select) are in model and it is
> independent from binding
> spring rcp have helper method (in form model) setFormObject and i use it for
> setting new object after crud operations
>
> spring rcp do next for me :
>
> when i bind visual class A to bean property propA (can be nested) then
> every change visual class contents (user type text or choose combo etc)
> change bean properties
> setting bean properties work with special interface only, like
>
> ValueModel model = formModel.getValueModel("propA");
> model.setValue(value);
>
> this construction change contents visual class, but simple
> customer.setPropA(value);
> change only bean property
>
> formModel.setFormObject(customer)
> change all visual classes bind with bean 'customer'
>
> framework do validation automatic, but I can call
> formModel.setValidation(false)
> or
> formModel.validate()
>
> settings validation : i create rules declarative with bean objects and
> properties (i add automatic validation for required fields from database or
> foreign and primary keys etc, too , but this is part of my framework)
>
> Thanks


--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
http://xswt.sf.net -- XML-based SWT page description language
Re: SWT Database widgets [message #566940 is a reply to message #2002] Fri, 14 October 2005 13:59 Go to previous message
John Graham is currently offline John GrahamFriend
Messages: 183
Registered: July 2009
Senior Member
Bahadir Yagan wrote:

> Hi,

> I wonder if DTP project includes data aware widgets for SWT.

> (ie: A Table that is associated with a JDBC resultset or a combo
> displaying all values of a data column)

> Regards,

> Bahadir

Hi Bahadir,

At the moment DTP does not, but I think that people working on the Visual
Editor (VE) project here at Eclipse have been looking at this area. I will
make them aware of this post, and perhaps they can then provide more
information.

Regards,
John Graham
Eclipse Data Tools Platform Project PMC
Re: SWT Database widgets [message #566961 is a reply to message #2002] Fri, 14 October 2005 14:49 Go to previous message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Bahadir Yagan wrote:
> Hi,
>
> I wonder if DTP project includes data aware widgets for SWT.
>
> (ie: A Table that is associated with a JDBC resultset or a combo
> displaying all values of a data column)

Hi Bahandir,

VE and JFace have been working together to provide data binding for
Eclipse. I expect that we will ship an early preview in either next
milestone build or the one after that.


Best,

Dave Orme

--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
http://xswt.sf.net -- XML-based SWT page description language
Re: SWT Database widgets [message #566992 is a reply to message #2032] Tue, 18 October 2005 11:17 Go to previous message
Bahadir Yagan is currently offline Bahadir YaganFriend
Messages: 21
Registered: July 2009
Junior Member
Hi,

Thanks. I checked-out the sources from CVS. I will try it when I got time.

I think this is a quite important feature for Eclipse and VE. I was
helping a friend to use Java, who has previous experience in .NET. It
was a bad thing to say that there is no Grid widget.



David J. Orme wrote:
> Bahadir Yagan wrote:
>> Hi,
>>
>> I wonder if DTP project includes data aware widgets for SWT.
>>
>> (ie: A Table that is associated with a JDBC resultset or a combo
>> displaying all values of a data column)
>
> Hi Bahandir,
>
> VE and JFace have been working together to provide data binding for
> Eclipse. I expect that we will ship an early preview in either next
> milestone build or the one after that.
>
>
> Best,
>
> Dave Orme
>
Re: SWT Database widgets [message #567011 is a reply to message #2046] Thu, 20 October 2005 18:56 Go to previous message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Bahadir Yagan wrote:
> Hi,
>
> Thanks. I checked-out the sources from CVS. I will try it when I got time.

Excellent.

Heads-up: we've moved over to Platform, which is where our latest work
is happening. Check out org.eclipse.jface.binding and friends. But be
advised that data binding API is still changing on nearly a daily basis
right now.

> I think this is a quite important feature for Eclipse and VE. I was
> helping a friend to use Java, who has previous experience in .NET. It
> was a bad thing to say that there is no Grid widget.

Re: Grid widget.

Look for CompositeTable and CompositeTableTest in the
org.eclipse.ve.sweet project.

I think that's what you want. It's modeless (no more click to edit),
lets you put any SWT control in any column, and is designed to be used
efficiently with the Visual Editor--something your friend with Microsoft
platform experience will appreciate.

It's designed so that it can work with any data binding framework, so
although everything is still internal API, CompositeTable isn't likely
to change much.


Best regards,

Dave Orme
--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
http://xswt.sf.net -- XML-based SWT page description language
Re: SWT Database widgets [message #567025 is a reply to message #2059] Thu, 20 October 2005 23:45 Go to previous message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
David,
i have any questions :
1) 'friends' are o.e.jface.examples.binding and o.e.jface.tests.binding
Are there yet one ?
2) Is o.e.ve.sweet deprecated ?
3) Is there nested bindings, for example , bind to person.address.street
4) Is there validation framework ?

i work rcp application with spring-rcp bindings (yes, swing control in rcp
view) and use swing because
- swt haven't good binding framework (with nested binding for ORM/hibernate
POJO)
- swing JTable (and swingx JXTable) is better than swt Table (model can be
list, header mouse event management, resizing and hiding column etc)

Thanks

David J. Orme wrote:

> Bahadir Yagan wrote:
>> Hi,
>>
>> Thanks. I checked-out the sources from CVS. I will try it when I got
>> time.
>
> Excellent.
>
> Heads-up: we've moved over to Platform, which is where our latest work
> is happening. Check out org.eclipse.jface.binding and friends. But be
> advised that data binding API is still changing on nearly a daily basis
> right now.
>
Re: SWT Database widgets [message #567285 is a reply to message #2073] Mon, 24 October 2005 14:56 Go to previous message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Haris Peco wrote:
> David,
> i have any questions :
> 1) 'friends' are o.e.jface.examples.binding and o.e.jface.tests.binding
> Are there yet one ?

That's all of them (for now).

> 2) Is o.e.ve.sweet deprecated ?

Not exactly; just out of date. Stuff in o.e.ve.sweet is gradually being
migrated into o.e.jface.binding.

> 3) Is there nested bindings, for example , bind to person.address.street

Yes, but not that way. There are validation framework issues with doing
that when you've got 1:m relationships going on.

> 4) Is there validation framework ?

Yes.

> i work rcp application with spring-rcp bindings (yes, swing control in rcp
> view) and use swing because
> - swt haven't good binding framework (with nested binding for ORM/hibernate
> POJO)
> - swing JTable (and swingx JXTable) is better than swt Table (model can be
> list, header mouse event management, resizing and hiding column etc)

Understood. We're obviously working hard to change this situation and
would love to have folks' help testing things as soon as we have
stabilized our API...


Best regards,

Dave Orme

--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
http://xswt.sf.net -- XML-based SWT page description language
Re: SWT Database widgets [message #567309 is a reply to message #3292] Mon, 24 October 2005 18:41 Go to previous message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
>
>> i work rcp application with spring-rcp bindings (yes, swing control in
>> rcp
>> view) and use swing because
>> - swt haven't good binding framework (with nested binding for
>> ORM/hibernate POJO)
>> - swing JTable (and swingx JXTable) is better than swt Table (model can
>> be list, header mouse event management, resizing and hiding column etc)
>
> Understood. We're obviously working hard to change this situation and
> would love to have folks' help testing things as soon as we have
> stabilized our API...
>
>
i would like test, but nested properties binding is very important for me
i don't accept jgoodies binding because haven't nested properties.
spring rcp have perfect binding - there is plan for swing independent
binding framework
i explore jface binding more
Thanks
Re: SWT Database widgets [message #567334 is a reply to message #3324] Mon, 24 October 2005 16:59 Go to previous message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Haris Peco wrote:
> i would like test, but nested properties binding is very important for me
> i don't accept jgoodies binding because haven't nested properties.
> spring rcp have perfect binding - there is plan for swing independent
> binding framework
> i explore jface binding more

Thanks for the feedback. Here are the issues I have uncovered with
nested property binding. Imagine a table control that is editing a
Customer object with an embeded Address object. Then the following must
be true:

1) Validation has to cascade to the nested objects. This is tricky to
get right.

2) Creating new objects may be tricky, depending on the back-end. Do
you need to register the new Address object with the persistence layer,
for example? If the Address object is reachable from multiple places in
your object graph, how do you make sure that all the object references
are correctly initialized.

3) The reverse of (2): When you're deleting a Customer object (okay, you
probably wouldn't ever delete a customer object, but suppose that this
is the kind of object you would delete), whose responsibility is it to
make sure that all references to the Customer object and its Address
object are correctly released?

How does Spring binding handle this? How would you like it to be done?


Best,

Dave Orme

--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
http://xswt.sf.net -- XML-based SWT page description language
Re: SWT Database widgets [message #567383 is a reply to message #3356] Mon, 24 October 2005 19:54 Go to previous message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
David J. Orme wrote:

> Haris Peco wrote:
>> i would like test, but nested properties binding is very important for me
>> i don't accept jgoodies binding because haven't nested properties.
>> spring rcp have perfect binding - there is plan for swing independent
>> binding framework
>> i explore jface binding more
>
> Thanks for the feedback. Here are the issues I have uncovered with
> nested property binding. Imagine a table control that is editing a
> Customer object with an embeded Address object. Then the following must
> be true:
>
> 1) Validation has to cascade to the nested objects. This is tricky to
> get right.
>

no, i don't agree.i want validation for bind properties only
for example, if i bind properties customer.address.street then i want
validation only for street in address object
in spring rcp we declare validation for object and properties and it isn't
important where obejcts is used
it isn't perfect because i can do validation but i can't suppress property
change.for example, if field is integer and i type 'a' then spring do
validation and return error, but show 'a' in visual field - i have
workaround for this and my suggestion isn't accepted from spring rcp

> 2) Creating new objects may be tricky, depending on the back-end. Do
> you need to register the new Address object with the persistence layer,
> for example? If the Address object is reachable from multiple places in
> your object graph, how do you make sure that all the object references
> are correctly initialized.
new spring rcp handle null object properties, but i don't use it
i have base bean for form, always and when i create bean object i create
empty object for object's properties automatic with reflection (with
BeanWrapper class from spring framework) - i do it only for bind properties
for example, if i bind customer.address.street (base form bean is customer)
i create empty bean address (empty is one created with no-constructor
argument) - if i don't bind address anywhere then i don't create address

simple, i expect from binding next : when change property visual class i
want that binding framework change bean properties automatic - inverse
change (change bean properties) change visual class only with special call
(value model) - we can't bidirectional changes without listener on setter
and it isn't important (i don't want listeners in POJO - this can be
resolved with AOP, but it is unnecessary) - i change bean properties with
value model
after every changes bean properties framework do validation (i can cancel
validation) - i cancel validation when user search database - user can type
'1%' in integer field for search all rows start with '1' and i don't want
validation for this
> 3) The reverse of (2): When you're deleting a Customer object (okay, you
> probably wouldn't ever delete a customer object, but suppose that this
> is the kind of object you would delete), whose responsibility is it to
> make sure that all references to the Customer object and its Address
> object are correctly released?
>
> How does Spring binding handle this? How would you like it to be done?
>
yes, i want delete (this is database application) and i don't delete
address.
this is many-to-one relation and deleting base object don't delete nested
objects.spring rcp do nothing and it isn't important for me
all crud operation (insert,delete,update,select) are in model and it is
independent from binding
spring rcp have helper method (in form model) setFormObject and i use it for
setting new object after crud operations

spring rcp do next for me :

when i bind visual class A to bean property propA (can be nested) then
every change visual class contents (user type text or choose combo etc)
change bean properties
setting bean properties work with special interface only, like

ValueModel model = formModel.getValueModel("propA");
model.setValue(value);

this construction change contents visual class, but simple
customer.setPropA(value);
change only bean property

formModel.setFormObject(customer)
change all visual classes bind with bean 'customer'

framework do validation automatic, but I can call
formModel.setValidation(false)
or
formModel.validate()

settings validation : i create rules declarative with bean objects and
properties (i add automatic validation for required fields from database or
foreign and primary keys etc, too , but this is part of my framework)

Thanks
Re: SWT Database widgets [message #567410 is a reply to message #3422] Mon, 24 October 2005 18:31 Go to previous message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
Thanks for your feedback.


Best,

Dave Orme

Haris Peco wrote:
> David J. Orme wrote:
>
>
>>Haris Peco wrote:
>>
>>>i would like test, but nested properties binding is very important for me
>>>i don't accept jgoodies binding because haven't nested properties.
>>>spring rcp have perfect binding - there is plan for swing independent
>>>binding framework
>>>i explore jface binding more
>>
>>Thanks for the feedback. Here are the issues I have uncovered with
>>nested property binding. Imagine a table control that is editing a
>>Customer object with an embeded Address object. Then the following must
>>be true:
>>
>>1) Validation has to cascade to the nested objects. This is tricky to
>>get right.
>>
>
>
> no, i don't agree.i want validation for bind properties only
> for example, if i bind properties customer.address.street then i want
> validation only for street in address object
> in spring rcp we declare validation for object and properties and it isn't
> important where obejcts is used
> it isn't perfect because i can do validation but i can't suppress property
> change.for example, if field is integer and i type 'a' then spring do
> validation and return error, but show 'a' in visual field - i have
> workaround for this and my suggestion isn't accepted from spring rcp
>
>
>>2) Creating new objects may be tricky, depending on the back-end. Do
>>you need to register the new Address object with the persistence layer,
>>for example? If the Address object is reachable from multiple places in
>>your object graph, how do you make sure that all the object references
>>are correctly initialized.
>
> new spring rcp handle null object properties, but i don't use it
> i have base bean for form, always and when i create bean object i create
> empty object for object's properties automatic with reflection (with
> BeanWrapper class from spring framework) - i do it only for bind properties
> for example, if i bind customer.address.street (base form bean is customer)
> i create empty bean address (empty is one created with no-constructor
> argument) - if i don't bind address anywhere then i don't create address
>
> simple, i expect from binding next : when change property visual class i
> want that binding framework change bean properties automatic - inverse
> change (change bean properties) change visual class only with special call
> (value model) - we can't bidirectional changes without listener on setter
> and it isn't important (i don't want listeners in POJO - this can be
> resolved with AOP, but it is unnecessary) - i change bean properties with
> value model
> after every changes bean properties framework do validation (i can cancel
> validation) - i cancel validation when user search database - user can type
> '1%' in integer field for search all rows start with '1' and i don't want
> validation for this
>
>>3) The reverse of (2): When you're deleting a Customer object (okay, you
>>probably wouldn't ever delete a customer object, but suppose that this
>>is the kind of object you would delete), whose responsibility is it to
>>make sure that all references to the Customer object and its Address
>>object are correctly released?
>>
>>How does Spring binding handle this? How would you like it to be done?
>>
>
> yes, i want delete (this is database application) and i don't delete
> address.
> this is many-to-one relation and deleting base object don't delete nested
> objects.spring rcp do nothing and it isn't important for me
> all crud operation (insert,delete,update,select) are in model and it is
> independent from binding
> spring rcp have helper method (in form model) setFormObject and i use it for
> setting new object after crud operations
>
> spring rcp do next for me :
>
> when i bind visual class A to bean property propA (can be nested) then
> every change visual class contents (user type text or choose combo etc)
> change bean properties
> setting bean properties work with special interface only, like
>
> ValueModel model = formModel.getValueModel("propA");
> model.setValue(value);
>
> this construction change contents visual class, but simple
> customer.setPropA(value);
> change only bean property
>
> formModel.setFormObject(customer)
> change all visual classes bind with bean 'customer'
>
> framework do validation automatic, but I can call
> formModel.setValidation(false)
> or
> formModel.validate()
>
> settings validation : i create rules declarative with bean objects and
> properties (i add automatic validation for required fields from database or
> foreign and primary keys etc, too , but this is part of my framework)
>
> Thanks


--
Visual Editor Project lead
http://www.db4o.com -- The Open-source Java Object Database
http://xswt.sf.net -- XML-based SWT page description language
Previous Topic:constraints for JDBCTable (was : datatools (cvs before 2 days), oracle , database explorer)
Next Topic:M1 Iteration 2 complete
Goto Forum:
  


Current Time: Fri Apr 26 20:25:41 GMT 2024

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

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

Back to the top