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 102178 - Some basic converters are missing in the binding library
Summary: Some basic converters are missing in the binding library
Status: VERIFIED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Binding (show other bugs)
Version: 6.x
Hardware: All Linux
: P3 blocker with 1 vote (vote)
Assignee: issues@guibuilder
URL:
Keywords:
: 102959 103130 103465 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-04-23 16:01 UTC by Jiri Vagner
Modified: 2007-06-27 14:13 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
log.txt (5.25 KB, text/plain)
2007-04-23 16:05 UTC, Jiri Vagner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Vagner 2007-04-23 16:01:35 UTC
Steps to reproduce:
 - New Project -> General -> Java Desktop Application -> Next
 - Database App. Shell -> Next
 - Select Sample demo db, Database table: Customer -> Next
 - In Detail Options dialog just press Finish button
 - Run generate application
 - Select row in table and check the console output of app.


Exception in thread "AWT-EventQueue-0" PropertyResolverException 
[description=Unable to set value text on
com.sun.java.swing.binding.JTextComponentBindingHelper$PropertyDelegate@1ecfe07
value=M,
source=javax.swing.JTextField[,116,124,377x19,disabled,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@502819,flags=296,maximumSize=,minimumSize=,preferredSize=,caretColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],disabledTextColor=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],editable=true,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0],selectedTextColor=sun.swing.PrintColorUIResource[r=51,g=51,b=51],selectionColor=javax.swing.plaf.ColorUIResource[r=184,g=207,b=229],columns=0,columnWidth=0,command=,horizontalAlignment=LEADING],
path=text]
        at
javax.beans.binding.PropertyResolver.setProperty0(PropertyResolver.java:559)
        at
javax.beans.binding.PropertyResolver.setProperty(PropertyResolver.java:528)
        at
javax.beans.binding.PropertyResolver.setValueOfLastProperty(PropertyResolver.java:196)
        at javax.beans.binding.Binding.sourceToTarget(Binding.java:1080)
        at javax.beans.binding.Binding.sourceChanged(Binding.java:866)


NetBeans IDE Dev (Build 20070423-0528)
1.6.0_02-ea; Java HotSpot(TM) Client VM 1.6.0_02-ea-b02
Linux version 2.6.17-10-386 running on i386
en_US (nb); UTF-8
Comment 1 Jiri Vagner 2007-04-23 16:05:20 UTC
Created attachment 41468 [details]
log.txt
Comment 2 Jan Stola 2007-04-24 11:36:10 UTC
The described problem is caused by a missing converter in the beans binding 
library. I have already filled several issues against the library. See
https://beansbinding.dev.java.net/issues/show_bug.cgi?id=1
https://beansbinding.dev.java.net/issues/show_bug.cgi?id=2
https://beansbinding.dev.java.net/issues/show_bug.cgi?id=3
Comment 3 Peter Pis 2007-05-02 14:01:06 UTC
*** Issue 103130 has been marked as a duplicate of this issue. ***
Comment 4 Jana Maleckova 2007-05-02 14:10:12 UTC
*** Issue 102959 has been marked as a duplicate of this issue. ***
Comment 5 Jiri Prox 2007-05-11 15:43:06 UTC
*** Issue 103465 has been marked as a duplicate of this issue. ***
Comment 6 Jiri Vagner 2007-05-16 15:34:21 UTC
Still there are no convertors for the following list of java types for basic db
column types ...

java.lang.Character
   - Derby: CHAR(1)
   - MySQL: CHAR(1)

java.lang.Date
   - Derby: DATE, TIME, TIMESTAMP
   - MySQL: DATE, DATETIME, TIME, TIMESTAMP, YEAR

java.math.BigInteger
   - Derby: BIGINT
   - MySQL: BIGINT, BIGINT UNSIGNED,  

java.math.BigDecimal
   - Derby: DECIMAL
   - MySQL: DECIMAL UNSIGNED, 

java.lang.Double
   - Derby: FLOAT, DOUBLE
   - MySQL: DOUBLE, DOUBLE UNSIGNED

java.lang.Float
   - Derby: REAL
   - MySQL: FLOAT, FLOAT UNSIGNED, 

java.lang.Short
   - Derby: SMALLINT
   - MySQL: SMALLINT, SMALLINT UNSIGNED, TINYINT, TINYINT UNSIGNED

java.lang.Boolean
   - MySQL: BIT, BOOL, 

java.lang.Long
   - MySQL: DECIMAL


I will add info about missing convertors for Oracle types next week.
Comment 7 Jan Stola 2007-05-16 15:48:24 UTC
BTW: There is no java.lang.Date, there is either java.util.Date or java.sql.Date
Comment 8 Jiri Vagner 2007-05-21 07:57:52 UTC
Oups, I'm sorry, right type is java.util.Date.
Comment 9 Jan Stola 2007-05-30 14:58:43 UTC
I have just commited an updated version of the Beans Binding library that 
contains converters for all primitive types (boolean, byte, ...), their 
wrappers (Boolean, Byte, ...) and BigInteger and BigDecimal.

Date and time types are not covered by this update. They are more general and 
it is up to user to implement converters according to their preferred format. 
On the other hand, we will consider some simplifications of this task (see 
issue 105147 ).
Comment 10 Jiri Vagner 2007-06-27 14:13:41 UTC
Verified

Product Version: NetBeans IDE Dev (Build 200706270025)
Java: 1.5.0_12; Java HotSpot(TM) Client VM 1.5.0_12-b04
System: Linux version 2.6.20-16-generic running on i386; UTF-8; en_US (nb)