This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 154068 - observableList as default setting for d&d db table action
Summary: observableList as default setting for d&d db table action
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Binding (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-28 09:34 UTC by polzleitner
Modified: 2009-05-25 20:57 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description polzleitner 2008-11-28 09:34:45 UTC
I use the form designer to bind a database to a JTable via drag-and-dropping a Database table to a JTable.

For clarity, let's assume the database table has the name "user". Then the initcomponents method will containg binding
code for a "userList" object. This code fails when I try to add records to the database table, because the associated
JTable object throws an IndexOutOfBounds exception. The jtable object is not updated.

Correction of this issue would be easy: Rather than having initComponents define a regular List, it should do a 
ObservableCollections.observableList instead. It can be verified that by manually selecting userList->Properties and
checking the "observable" checkbox the code will work.

It is not obvious that this checkbox should be enabled for most users. A very "hidden" feature. The checkbox should be
enabled by default when a database table is dropped to a JTable.
Comment 1 Jiri Vagner 2008-11-28 10:45:30 UTC
Thank for your enhancement. Master/Detail Sample Form wizard or New JDA Database Project wizard generates list with
checked the "observable" checkbox. We will also check this checkbox for d&d db table action.