|
View:
New views
12 Messages
—
Rating Filter:
Alert me
|
|
|
[core] New Desktop Database Application Wizard resulting application behaviourHi All,
Another long subject line! I'm still trying to work with master and detail tables in a desktop database application. Thanks to Jana Maleckova's pointer about the foreign key needing to be declared, and sample table example, the New Project Wizard will create for me a simple form based on the two tables. I can enter a master record with no problem [1]. When I click the master table's New button, a new row appears in the master table. It's even selected [2]. I can enter data, save it, refresh it. The problem comes when I try to enter a detail row. I select a row in the master table, and click the detail table's New button. The new row isn't visible. You can't put data in it. You're stuck unless you select a different row in the master table, and then select the row you actually wanted. The detail table is drawn and the new row is visible and available. I've looked at the code that the wizard generates to handle new detail rows. The new row is created, persisted, added and selected. For some reason, detailTable.scrollRectToVisible(detailTable.getCellRect(row, 0, true)); isn't making the row appear. I even tried some explicit repainting, without success. Is it just something I'm doing wrong? [3] To create the same tables and invoke the wizard: (Release RC1 on Windows XP Pro and Windows 2000) I'm using the tables from Jana's example, but I changed the table names from TEST1 and TEST2. These are created in a Java DB database. CREATE TABLE AUTHOR ( AUTHOR_ID INT NOT NULL, FIRSTNAME VARCHAR(200) NOT NULL, SURNAME VARCHAR(200) NOT NULL, PRIMARY KEY (AUTHOR_ID) ); CREATE TABLE BOOK ( ALBUM_ID INT NOT NULL, ALBUMNAME VARCHAR(200) NOT NULL, AUTHOR_INH INT, FOREIGN KEY (AUTHOR_INH) REFERENCES AUTHOR (AUTHOR_ID), PRIMARY KEY (ALBUM_ID) ); Then run the New Project > Java Desktop Application > Database Application wizard. Make AUTHOR your master table. Book will be your details table. Run the resulting application. Enter a new author with the ID 1. Save the author. Try to enter a new book. If you can't, try entering another author and use the trick of switching back and forth. Thanks for reading this far, Robert [1] It took a while for the form to train me. Always exit the field to make the data "real". Never use the Enter key for navigation. Always use the Tab key, but don't expect it to go to the next column in the same row unless there's only one row. [2] Ideally, the focus would also go to the place where you're about to enter data. Showing the row selected but not giving it focus is just a tease. [3] Again? But there are some redraw issues here. If the application languishes in the background, say while you're posting a longwinded description to NetCAT, when you bring it to the foreground sometimes the frame only partly redraws. You have a lot of grey space where tables and buttons should be. The tooltips still pop up for invisible buttons. ![]() |
|
|
Re: [core] New Desktop Database Application Wizard resulting application behaviouri said time ago that the problem with that wizard was that only one table can be used, now i see for the post, (now i cant try it) that can be used two tables, well , i would like to use the wizard several times in the same project, the only thing you have to do its not create the project, i mean in a project theres not only one master table an only one detail table, could be more, please ...;)
2007/11/18, RobertPage <page@...>:
|
|
|
Re: [core] New Desktop Database Application Wizard resulting application behaviourHi Luis,
I know what you mean. I'd like to port our terminal-based application to Java, using NetBeans as the design tool. It's the diagnostic labs portion of a medical records system - one master-detail form per project certainly wouldn't be workable! For our little team this is a "community acceptance" issue. The question is whether we can use NetBeans for this type of design, or if that level of functionality is still a release or two off. There does seem to be a way to create other database forms, including master-detail, in the same project and package. If you right-click on the package in the Projects window, and choose New > Other you can create a "Swing GUI Form" with the sub-type of "Master Detail Sample Form". The dialog is almost like running the wizard, except the result is a simple form with its own main() method. (The project wizard, by comparison, creates a view/app pair, where the main method resides in the app.) The form has no top menu bar or bottom status bar. (It also doesn't show the detail when you press the New detail record button). I tried to do this as master-detail using the same two tables (BOOK and AUTHOR). It gets created fine, but when you run the form it generates an exception: Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: An exception occured while creating a query in EntityManager at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.createQuery(EntityManagerImpl.java:209) A single table version based on AUTHOR alone seems to run normally. I finally created two different tables, and successfully created a master-detail form that runs using them. Publisher is the master, and Editor is the detail. CREATE TABLE PUBLISHER ( PUBLISHER_ID INT NOT NULL, COMPANYNAME VARCHAR(200) NOT NULL, PRIMARY KEY (PUBLISHER_ID) ); CREATE TABLE EDITOR ( EDITOR_ID INT NOT NULL, FIRSTNAME VARCHAR(200) NOT NULL, SURNAME VARCHAR(200) NOT NULL, PUBLISHER_INH INT, FOREIGN KEY (PUBLISHER_INH) REFERENCES PUBLISHER (PUBLISHER_ID), PRIMARY KEY (EDITOR_ID) ); The new form runs normally, and seems to be able to exist in the same package. I don't pretend to know yet what all the non-obvious differences are. But there is a way to create more than one database form in a package. Regards, Robert |
|
|
Re: [core] New Desktop Database Application Wizard resulting application behaviourits not clear to me the workaround you used to make it work...
2007/11/18, RobertPage <page@...>:
|
|
|
Re: [core] New Desktop Database Application Wizard resulting application behaviourin windows the option of right-click on the package in the Projects
window, and choose New > Other you can create a "Swing GUI Form" with the sub-type of "Master Detail Sample Form". works, there is an exception like you said , but i build it again the error dissapear and the forms work well. thanks. 2007/11/18, RobertPage <page@...>:
|
|
|
Re: [core] New Desktop Database Application Wizard resulting application behaviourHi Robert again ;),
complication connected with creating new record in detailed table there is known issue. This is a consequence of the latest update of Beans Binding library. We don't want to deal with ObservableCollections in our master/detail template (it is not straightforward when using JPA). Hence, we force the update of the detail table by un-selection and re-selection of the corresponding row in the master table. This worked with the previous versions of the library because they worked as if they had 'sourceUnreadableValue' set to 'null' for all bindings. Now, when the selection is cleared then nothing happens because 'sourceUnreadableValue' is not set for 'detailTable.elements' binding. The fix is to set 'sourceUnreadableValue' of this binding to 'null'. It has been already solved in trunk, but not for NetBeans 6.0 because it's too late :o(. If you want to fix that in form/application generated by NetBeans 6.0, follow these steps: 1. Select detailTable 2. Switch to Binding category in Properties window 3. Select elements property 4. Invoke property customizer (Press ... button) 5. Switch to Advanced tab. 6. Check 'Unreadable Source Value' (<none> should be selected in combo next to this check-box). 7. Press OK. FOR NOTE: All the templates which are generated during building process of JDA project, should demonstrate the way how to use JPA and beans binding. We don't want to overload users with very complicated code. and therefore please don't confirm this as a real - world application. It's really just a sample. Thanks for understanding ;o) Regards Janie RobertPage napsal(a): > Hi All, > > Another long subject line! > > I'm still trying to work with master and detail tables in a desktop > database application. > Thanks to Jana Maleckova's pointer about the foreign key needing to be > declared, and sample > table example, the New Project Wizard will create for me a simple form based > on the two tables. > > I can enter a master record with no problem [1]. When I click the master > table's New button, a new row appears in the master table. It's even > selected [2]. I can enter data, save it, refresh it. > > The problem comes when I try to enter a detail row. > > I select a row in the master table, and click the detail table's New > button. The new row isn't visible. > You can't put data in it. You're stuck unless you select a different row in > the master table, and then select the row you actually wanted. The detail > table is drawn and the new row is visible and available. > > I've looked at the code that the wizard generates to handle new detail > rows. The new row is created, persisted, added and selected. For some > reason, > > detailTable.scrollRectToVisible(detailTable.getCellRect(row, 0, true)); > > isn't making the row appear. I even tried some explicit repainting, without > success. > Is it just something I'm doing wrong? [3] > > To create the same tables and invoke the wizard: > (Release RC1 on Windows XP Pro and Windows 2000) > I'm using the tables from Jana's example, but I changed the table names > from TEST1 and TEST2. > These are created in a Java DB database. > > CREATE TABLE AUTHOR > ( > AUTHOR_ID INT NOT NULL, > FIRSTNAME VARCHAR(200) NOT NULL, > SURNAME VARCHAR(200) NOT NULL, > PRIMARY KEY (AUTHOR_ID) > ); > > CREATE TABLE BOOK > ( > ALBUM_ID INT NOT NULL, > ALBUMNAME VARCHAR(200) NOT NULL, > AUTHOR_INH INT, > FOREIGN KEY (AUTHOR_INH) REFERENCES AUTHOR (AUTHOR_ID), > PRIMARY KEY (ALBUM_ID) > ); > > Then run the New Project > Java Desktop Application > Database Application > wizard. Make AUTHOR your master table. Book will be your details table. Run > the resulting application. Enter a new author with the ID 1. Save the > author. Try to enter a new book. If you can't, try entering another author > and use the trick of switching back and forth. > > Thanks for reading this far, > Robert > > > > > [1] It took a while for the form to train me. Always exit the field to make > the data "real". Never use the Enter key for navigation. Always use the Tab > key, but don't expect it to go to the next column in the same row unless > there's only one row. > > [2] Ideally, the focus would also go to the place where you're about to > enter data. Showing the row selected but not giving it focus is just a > tease. > > [3] Again? But there are some redraw issues here. If the application > languishes in the background, say while you're posting a longwinded > description to NetCAT, when you bring it to the foreground sometimes > the frame only partly redraws. You have a lot of grey space where tables and > buttons should be. The tooltips still pop up for invisible buttons. > http://www.nabble.com/file/p13815728/HalfAnApp.jpg > |
|
|
Re: [core] New Desktop Database Application Wizard resulting application behaviourHi Janie,
Once again, you have been a great help! I appreciate the explanation and the work-around. I just made the change in my sample form and it works much better. Maybe there will be a tutorial that includes that step, at least until it makes it into a standard release. I agree that the forms the wizard produces are meant to be a learning aid, and not a real-world application. I'm using them for exactly that as I read over John O'Connor's article "Using the Java Persistence API in Desktop Applications". [1] My problem was that even the simple demonstration form wasn't working. ;) It's all good now. Is it safe to assume that the JPA is the best way to implement database forms and projects? One of the things I love about Java is that there is continual progress. I started working with result sets and data retrieval. From there I started with forms using rowSet implementations. I was about to get into serious prototyping with that when NetBeans 6 came out and seemed to be pointing to the JPA. (Which is an improvement.) Also, I think that what the database application wizard/dialog does is incredible. The code it produces has been a big help to me in understanding annotations and persistence. There was just that one major issue, and now you've given me the work-around for it. Thanks again, Robert [1] http://java.sun.com/developer/technicalArticles/J2SE/Desktop/persistenceapi/
|
|
|
Re: [core] New Desktop Database Application Wizard resulting application behaviourHi Robert,
RobertPage napsal(a): > Hi Janie, > > Once again, you have been a great help! I appreciate the explanation and > the work-around. > I just made the change in my sample form and it works much better. Maybe > there will be a tutorial > that includes that step, at least until it makes it into a standard release. > It's good idea, I will temporary include this note among other FAQ's > Is it safe to assume that the JPA is the best way to implement database > forms and projects? > It depends. From the technological point of view, JPA is stable technology but if you are developing real-world application, you have to think about many factors. Therefore I recommend to read articles about JPA which can provide you self-contained view about JPA's strong points and weaknesses... > One of the things I love about Java is that there is continual progress. I > started working with result sets > and data retrieval. From there I started with forms using rowSet > implementations. I was about to get into > serious prototyping with that when NetBeans 6 came out and seemed to be > pointing to the JPA. (Which is > an improvement.) > > Also, I think that what the database application wizard/dialog does is > incredible. The code it produces > has been a big help to me in understanding annotations and persistence. > There was just that one major > issue, and now you've given me the work-around for it. > > > Thanks again, > Robert > > Regards Janie |
|
|
Re: [core] New Desktop Database Application Wizard resulting application behaviour (new)Hi All,
I'm still having problems with the code the Dialog/Wizard generates. In some cases on my slower Windows 2000 machine it stops before the final building step and leaves me with references to placeholders like: Collection<tp2.ReqQue> rs = s.get_joinCollectionCapital_(); in the newDetailRecord() and the deleteDetailRecord() methods. I couldn't reproduce that on my new Windows XP Pro machine. Instead, while I was trying, I ran into a different problem that I can reproduce. While I was using a form to change some data in a detail record, I encountered an exception. (A test case is included below.) Exception in thread "AWT-EventQueue-0" org.jdesktop.beansbinding.PropertyResolutionException: Error evaluating EL expression ValueExpression[${albumname}] on dialogtest.Book[albumId=103] OS: Windows 2000 and XP Pro NetBeans release 6.0 Steps to reproduce: 1. Create and populate the following tables. CREATE TABLE AUTHOR ( AUTHOR_ID INT NOT NULL, FIRSTNAME VARCHAR(200) NOT NULL, SURNAME VARCHAR(200) NOT NULL, PRIMARY KEY (AUTHOR_ID) ); CREATE TABLE BOOK ( ALBUM_ID INT NOT NULL, ALBUMNAME VARCHAR(200) NOT NULL, AUTHOR_INH INT, FOREIGN KEY (AUTHOR_INH) REFERENCES AUTHOR (AUTHOR_ID), PRIMARY KEY (ALBUM_ID) ); insert into author values (1, 'Larry', 'Niven'); insert into author values (2, 'Berke', 'Brethed'); insert into author values (3, 'Douglas', 'Adams'); insert into author values (4, 'Pierre', 'Burton'); insert into book values (101, 'N Space', 1); insert into book values (102, 'Ringworld', 1); insert into book values (103, 'HHG', 3); insert into book values (104, 'So Long', 3); insert into book values (105, 'Vimy', 4); 2. Generate the application as a New Project (Java - Java Desktop Application | Database Application). AUTHOR is the master table, BOOK is the detail table. 3. Fix the binding on the detail table. (See earlier posts in this thread re: binding/elements/advanced) 4. Start the application. You should see 4 authors. Click on 'Niven'. You should see 2 books. Click on 'Brethed'. You should see no books. Click on 'Adams'. You should see 2 books. Click on Burton. You should see 1 book. Click on 'Adams' again. You should see 2 books. Double-click on the Albumname 'HHG' to invoke the editor. Append the words ' to the' after the 'HHG'. Click on the Album ID for that record (103) to force parsing of the Albumname. You should see an Exception. Exception in thread "AWT-EventQueue-0" org.jdesktop.beansbinding.PropertyResolutionException: Error evaluating EL expression ValueExpression[${albumname}] on dialogtest.Book[albumId=103] (See below). The Save button becomes hilighted. If you click it, every exisiting first book appears to be changed to that same albumname. If you click the Refresh button, they still look changed (but they aren't really changed in the database). 5.Stop the application and restart it to verify that only 1 record has changed. Fortunately, only the changes to Album ID 103 are are saved to the database. The others are back to normal. The EL Exception: [TopLink Info]: 2007.12.05 11:20:39.921--ServerSession(4875224)--TopLink, version: Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007)) [TopLink Info]: 2007.12.05 11:20:40.500--ServerSession(4875224)--file:/C:/Documents%20and%20Settings/default/My%20Documents/NetBeansProjects/DialogTest/build/classes/-DialogTestPU login successful 5-Dec-2007 11:20:41 AM org.jdesktop.application.SessionStorage restoreTree WARNING: No saved state for javax.swing.JTable[detailTable,0,0,419x0,alignmentX=0.0,alignmentY=0.0,border=,flags=251658568,maximumSize=,minimumSize=,preferredSize=,autoCreateColumnsFromModel=true,autoResizeMode=AUTO_RESIZE_SUBSEQUENT_COLUMNS,cellSelectionEnabled=false,editingColumn=-1,editingRow=-1,gridColor=javax.swing.plaf.ColorUIResource[r=128,g=128,b=128],preferredViewportSize=java.awt.Dimension[width=450,height=400],rowHeight=16,rowMargin=1,rowSelectionAllowed=true,selectionBackground=javax.swing.plaf.ColorUIResource[r=192,g=220,b=192],selectionForeground=javax.swing.plaf.ColorUIResource[r=0,g=0,b=0],showHorizontalLines=true,showVerticalLines=true] Exception in thread "AWT-EventQueue-0" org.jdesktop.beansbinding.PropertyResolutionException: Error evaluating EL expression ValueExpression[${albumname}] on dialogtest.Book[albumId=103] at org.jdesktop.beansbinding.ELProperty.setValue(ELProperty.java:507) at org.jdesktop.beansbinding.Binding.saveUnmanaged(Binding.java:1275) at org.jdesktop.swingbinding.JTableBinding$ColumnBinding.saveUnmanaged0(JTableBinding.java:654) at org.jdesktop.swingbinding.JTableBinding$ColumnBinding.access$1800(JTableBinding.java:542) at org.jdesktop.swingbinding.JTableBinding$BindingTableModel.setValueAt(JTableBinding.java:745) at javax.swing.JTable.setValueAt(JTable.java:2676) at javax.swing.JTable.editingStopped(JTable.java:4675) at javax.swing.AbstractCellEditor.fireEditingStopped(AbstractCellEditor.java:125) at javax.swing.DefaultCellEditor$EditorDelegate.stopCellEditing(DefaultCellEditor.java:330) at javax.swing.DefaultCellEditor.stopCellEditing(DefaultCellEditor.java:215) at javax.swing.JTable$GenericEditor.stopCellEditing(JTable.java:5429) at javax.swing.plaf.basic.BasicTableUI$Handler.mousePressed(BasicTableUI.java:986) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:263) at java.awt.Component.processMouseEvent(Component.java:6035) at javax.swing.JComponent.processMouseEvent(JComponent.java:3260) at java.awt.Component.processEvent(Component.java:5803) at java.awt.Container.processEvent(Container.java:2058) at java.awt.Component.dispatchEventImpl(Component.java:4410) at java.awt.Container.dispatchEventImpl(Container.java:2116) at java.awt.Component.dispatchEvent(Component.java:4240) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3983) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916) at java.awt.Container.dispatchEventImpl(Container.java:2102) at java.awt.Window.dispatchEventImpl(Window.java:2429) at java.awt.Component.dispatchEvent(Component.java:4240) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121) Caused by: org.jdesktop.el.ELException: java.lang.NullPointerException at org.jdesktop.el.BeanELResolver.setValue(BeanELResolver.java:335) at org.jdesktop.beansbinding.TempELContext$BeanDelegateELResolver.setValue(TempELContext.java:87) at org.jdesktop.el.CompositeELResolver.setValue(CompositeELResolver.java:265) at org.jdesktop.el.impl.parser.AstIdentifier.setValue(AstIdentifier.java:81) at org.jdesktop.el.impl.ValueExpressionImpl.setValue(ValueExpressionImpl.java:259) at org.jdesktop.beansbinding.ELProperty.setValue(ELProperty.java:505) ... 32 more Caused by: java.lang.NullPointerException at org.jdesktop.beansbinding.ELProperty$SourceEntry.sourceChanged(ELProperty.java:324) at org.jdesktop.beansbinding.ELProperty$SourceEntry.propertyChange(ELProperty.java:333) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276) at dialogtest.Book.setAlbumname(Book.java:70) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jdesktop.el.BeanELResolver.setValue(BeanELResolver.java:330) ... 37 more Since this part of NetBeans is a work in progress, and NetCAT is winding down, where's the best place to post about any future problems? (I'm assuming another Netbeans.org group). Also, in terms of IssueZilla, what components would this be classed under? Core/dialog? Thanks for the help, Robert |
|
|
Re: [core] New Desktop Database Application Wizard resulting application behaviour (new)Hi Robert,
It's really reproducible and seems to be beansbinding library issue. Our developer will do some investigation and then enter issue agains this library. ( issuzilla for beansbiding is placed there : https://beansbinding.dev.java.net/issues/query.cgi) Thanks for reproducible usecase. You are right, 60cat is going to be closed but if you have any other question you can subscript yourself in nbusers mailing list. (http://www.netbeans.org/community/lists/top.html) where your questions will be answered. Regards Janie RobertPage napsal(a): > Hi All, > > I'm still having problems with the code the Dialog/Wizard generates. > In some cases on my slower Windows 2000 machine it stops before the final > building step and > leaves me with references to placeholders like: > Collection<tp2.ReqQue> rs = s.get_joinCollectionCapital_(); > in the newDetailRecord() and the deleteDetailRecord() methods. > > I couldn't reproduce that on my new Windows XP Pro machine. Instead, while I > was trying, I ran into > a different problem that I can reproduce. > > While I was using a form to change some data in a detail record, I > encountered an exception. > (A test case is included below.) > > Exception in thread "AWT-EventQueue-0" > org.jdesktop.beansbinding.PropertyResolutionException: > Error evaluating EL expression ValueExpression[${albumname}] on > dialogtest.Book[albumId=103] > > OS: Windows 2000 and XP Pro > NetBeans release 6.0 > > Steps to reproduce: > > 1. Create and populate the following tables. > > > CREATE TABLE AUTHOR > ( > AUTHOR_ID INT NOT NULL, > FIRSTNAME VARCHAR(200) NOT NULL, > SURNAME VARCHAR(200) NOT NULL, > PRIMARY KEY (AUTHOR_ID) > ); > > CREATE TABLE BOOK > ( > ALBUM_ID INT NOT NULL, > ALBUMNAME VARCHAR(200) NOT NULL, > AUTHOR_INH INT, > FOREIGN KEY (AUTHOR_INH) REFERENCES AUTHOR (AUTHOR_ID), > PRIMARY KEY (ALBUM_ID) > ); > > insert into author values (1, 'Larry', 'Niven'); > insert into author values (2, 'Berke', 'Brethed'); > insert into author values (3, 'Douglas', 'Adams'); > insert into author values (4, 'Pierre', 'Burton'); > > insert into book values (101, 'N Space', 1); > insert into book values (102, 'Ringworld', 1); > insert into book values (103, 'HHG', 3); > insert into book values (104, 'So Long', 3); > insert into book values (105, 'Vimy', 4); > > 2. Generate the application as a New Project (Java - Java Desktop > Application | Database Application). > AUTHOR is the master table, BOOK is the detail table. > > 3. Fix the binding on the detail table. (See earlier posts in this thread > re: binding/elements/advanced) > > 4. Start the application. > You should see 4 authors. > Click on 'Niven'. You should see 2 books. > Click on 'Brethed'. You should see no books. > Click on 'Adams'. You should see 2 books. > Click on Burton. You should see 1 book. > Click on 'Adams' again. You should see 2 books. > Double-click on the Albumname 'HHG' to invoke the editor. > Append the words ' to the' after the 'HHG'. > Click on the Album ID for that record (103) to force parsing of the > Albumname. > You should see an Exception. > Exception in thread "AWT-EventQueue-0" > org.jdesktop.beansbinding.PropertyResolutionException: > Error evaluating EL expression ValueExpression[${albumname}] on > dialogtest.Book[albumId=103] > (See below). > The Save button becomes hilighted. If you click it, every exisiting first > book appears to be changed to that same albumname. > If you click the Refresh button, they still look changed (but they aren't > really changed in the database). > > 5.Stop the application and restart it to verify that only 1 record has > changed. > Fortunately, only the changes to Album ID 103 are are saved to the database. > The others are back to normal. > > The EL Exception: > > [TopLink Info]: 2007.12.05 11:20:39.921--ServerSession(4875224)--TopLink, > version: Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007)) > [TopLink Info]: 2007.12.05 > 11:20:40.500--ServerSession(4875224)--file:/C:/Documents%20and%20Settings/default/My%20Documents/NetBeansProjects/DialogTest/build/classes/-DialogTestPU > login successful > 5-Dec-2007 11:20:41 AM org.jdesktop.application.SessionStorage restoreTree > WARNING: No saved state for > javax.swing.JTable[detailTable,0,0,419x0,alignmentX=0.0,alignmentY=0.0,border=,flags=251658568,maximumSize=,minimumSize=,preferredSize=,autoCreateColumnsFromModel=true,autoResizeMode=AUTO_RESIZE_SUBSEQUENT_COLUMNS,cellSelectionEnabled=false,editingColumn=-1,editingRow=-1,gridColor=javax.swing.plaf.ColorUIResource[r=128,g=128,b=128],preferredViewportSize=java.awt.Dimension[width=450,height=400],rowHeight=16,rowMargin=1,rowSelectionAllowed=true,selectionBackground=javax.swing.plaf.ColorUIResource[r=192,g=220,b=192],selectionForeground=javax.swing.plaf.ColorUIResource[r=0,g=0,b=0],showHorizontalLines=true,showVerticalLines=true] > Exception in thread "AWT-EventQueue-0" > org.jdesktop.beansbinding.PropertyResolutionException: > Error evaluating EL expression ValueExpression[${albumname}] on > dialogtest.Book[albumId=103] > at > org.jdesktop.beansbinding.ELProperty.setValue(ELProperty.java:507) > at > org.jdesktop.beansbinding.Binding.saveUnmanaged(Binding.java:1275) > at > org.jdesktop.swingbinding.JTableBinding$ColumnBinding.saveUnmanaged0(JTableBinding.java:654) > at > org.jdesktop.swingbinding.JTableBinding$ColumnBinding.access$1800(JTableBinding.java:542) > at > org.jdesktop.swingbinding.JTableBinding$BindingTableModel.setValueAt(JTableBinding.java:745) > at javax.swing.JTable.setValueAt(JTable.java:2676) > at javax.swing.JTable.editingStopped(JTable.java:4675) > at > javax.swing.AbstractCellEditor.fireEditingStopped(AbstractCellEditor.java:125) > at > javax.swing.DefaultCellEditor$EditorDelegate.stopCellEditing(DefaultCellEditor.java:330) > at > javax.swing.DefaultCellEditor.stopCellEditing(DefaultCellEditor.java:215) > at > javax.swing.JTable$GenericEditor.stopCellEditing(JTable.java:5429) > at > javax.swing.plaf.basic.BasicTableUI$Handler.mousePressed(BasicTableUI.java:986) > at > java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:263) > at java.awt.Component.processMouseEvent(Component.java:6035) > at javax.swing.JComponent.processMouseEvent(JComponent.java:3260) > at java.awt.Component.processEvent(Component.java:5803) > at java.awt.Container.processEvent(Container.java:2058) > at java.awt.Component.dispatchEventImpl(Component.java:4410) > at java.awt.Container.dispatchEventImpl(Container.java:2116) > at java.awt.Component.dispatchEvent(Component.java:4240) > at > java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322) > at > java.awt.LightweightDispatcher.processMouseEvent(Container.java:3983) > at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916) > at java.awt.Container.dispatchEventImpl(Container.java:2102) > at java.awt.Window.dispatchEventImpl(Window.java:2429) > at java.awt.Component.dispatchEvent(Component.java:4240) > at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) > at > java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) > at > java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) > at > java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) > at > java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) > at > java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) > at java.awt.EventDispatchThread.run(EventDispatchThread.java:121) > Caused by: org.jdesktop.el.ELException: java.lang.NullPointerException > at org.jdesktop.el.BeanELResolver.setValue(BeanELResolver.java:335) > at > org.jdesktop.beansbinding.TempELContext$BeanDelegateELResolver.setValue(TempELContext.java:87) > at > org.jdesktop.el.CompositeELResolver.setValue(CompositeELResolver.java:265) > at > org.jdesktop.el.impl.parser.AstIdentifier.setValue(AstIdentifier.java:81) > at > org.jdesktop.el.impl.ValueExpressionImpl.setValue(ValueExpressionImpl.java:259) > at > org.jdesktop.beansbinding.ELProperty.setValue(ELProperty.java:505) > ... 32 more > Caused by: java.lang.NullPointerException > at > org.jdesktop.beansbinding.ELProperty$SourceEntry.sourceChanged(ELProperty.java:324) > at > org.jdesktop.beansbinding.ELProperty$SourceEntry.propertyChange(ELProperty.java:333) > at > java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339) > at > java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276) > at dialogtest.Book.setAlbumname(Book.java:70) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.jdesktop.el.BeanELResolver.setValue(BeanELResolver.java:330) > ... 37 more > > > Since this part of NetBeans is a work in progress, and NetCAT is winding > down, where's the best > place to post about any future problems? (I'm assuming another Netbeans.org > group). > Also, in terms of IssueZilla, what components would this be classed under? > Core/dialog? > > Thanks for the help, > Robert > |
|
|
Re: [core] New Desktop Database Application Wizard resulting application behaviour (new)few days ago i tested it in windows 2003 (two different computers) and run well. with differents databases, with relations (master/detail ) and whitout, always MySql. 2007/12/5, RobertPage <
page@...>:
|