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.
Hi, first bug report, so apologies if it is filed incorrectly. Steps: Create a class "myBean" with a single property "int myVariable;" Using "Factoring" -> "Encapsulate Fields" to create setters/getters for above property, and enable "Generate Property Change Support" The resulting code has has in the setter: <code>public static final String PROP_MYVARIABLE = "PROP_MYVARIABLE";</code> <code>firePropertyChange(PROP_PROP_MYVARIABLE, oldMyVariable, newMyVariable);</code> Create a GUI frame, add a reference to "myBean", then add any text element, use "bind" -> "text", and select the binding source "Form" and use the ${myBean.myVariable}. Any updates to the bean do not update the GUI form. However, events are triggered and the bean is updated, the GUI just doesnt get update. To work around, remove the "PROP_" and reset the String variable value to the fields case. <code>public static final String PROP_MYVARIABLE = "myVariable";</code> Once done, bean updates are reflected within the GUI correctly. PS: When using "Insert Code" -> "Add Property" the correct result is achieved. Many thanks.
reproducible The Encapsulate Filed generates wrong string in PROP_ field
changeset : f079ac6bd2d7 author : Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> date : Tue Sep 02 01:44:38 CEST 2014 summary : #237588 - Encapsulate Fields and GUI Binding
Integrated into 'main-silver', will be available in build *201409130001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/f079ac6bd2d7 User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org> Log: #237588 - Encapsulate Fields and GUI Binding