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 195815 - MasterDetailForm code generaiting
Summary: MasterDetailForm code generaiting
Status: CLOSED DUPLICATE of bug 195818
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-22 15:43 UTC by asenk
Modified: 2011-03-18 08:44 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description asenk 2011-02-22 15:43:17 UTC
Product Version: NetBeans IDE Dev (Build 201102220001)
Java: 1.7.0-ea; Java HotSpot(TM) Client VM 21.0-b02
System: Linux version 2.6.32-24-generic running on i386; UTF-8; en_US (nb)

   1. Invoke New Project wizard
   2. Choose 'Java' Category - 'Java Desktop Application' Project and press 'Next >'
   3. Type e.g. "MyApplication" for Project Name and choose 'Database Application' shell and press 'Next >'
   4. Choose 'jdbc:derby...[[[appOnAPP | [app on APP]]' in Database Connection and change Database Table to 'PRODUCT'
   5. Move all items at once from 'Colums to Include' to 'Available Columns' by pressing the ' << ' button
   6. Move 'PRODUCT_ID', 'MARKUP' and 'DESCRIPTION' back to 'Colums to Include' using the ' > ' button
   7. Press 'Next >'
   8. Don't change any settings on the last screen and press 'Finish' 

AND THEN:
# Select 'myapplication' package and invoke New File wizard
# Choose 'Swing GUI Forms - Master/Detail Sample Form' and press 'Next >'
# Change name to e.g. "MyMasterDetail" and press 'Next >'
# Choose sample database connection and leave 'CUSTOMER' as Database Table. Press 'Next >'
# Check Create Detail Area as Table option
# Press "Finish" button 

RESULT: The MyMasterDetail form is generated with errors. it is impossible to compile it.
Comment 1 Antonin Nebuzelsky 2011-03-11 14:33:13 UTC
Reproducible without JDK7, removing keyword.

The erroneous parts of code look like:

  int index = masterTable.getSelectedRow();
  java.lang.Object O = list.get(masterTable.convertRowIndexToModel(index));
  Collection<java.lang.Object> os = O.get_joinCollectionCapital_();

where O.get_joinCollectionCapital_() does not make sense.

and later in the code:

  O.set_joinCollectionCapital_((List) os);
  o.set_joinCapital_(O);
Comment 2 Antonin Nebuzelsky 2011-03-14 15:36:47 UTC
Reproducible also with 6.9.1.
Comment 3 Antonin Nebuzelsky 2011-03-14 15:49:15 UTC
Marking as a dup of issue 195818. See comment #13 there.

*** This bug has been marked as a duplicate of bug 195818 ***
Comment 4 asenk 2011-03-16 12:01:29 UTC
Product Version: NetBeans IDE Dev (Build 201103160400)
Java: 1.6.0_24; Java HotSpot(TM) Client VM 19.1-b02
System: Linux version 2.6.32-24-generic running on i386; UTF-8; en_US (nb)

Verified
Comment 5 asenk 2011-03-16 12:03:07 UTC
This bug is marked as duplicate, but i tried both usecases(this and the second in duplicated bug.) Both works.
Comment 6 Marian Mirilovic 2011-03-18 08:44:26 UTC
v/c