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.
Product Version: NetBeans IDE Dev (Build 200812170242) Java: 1.6.0_10; Java HotSpot(TM) Client VM 11.0-b15 System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb) To reproduce: - create Visual MIDlet with HelloMIDlet; - in Navigator, add a new DataSet; - switch to Screen, select stringItem element; - in Properties, open Text custom property editor; - select dataSet value in Datasets combobox; - enter mydata.string in EL read entry field, press OK; - switch to Screen, select stringItem element; - invoke Go To Source popup menu command; stringItem getter looks like follows: public StringItem getStringItem() { if (stringItem == null) { // write pre-init user code here stringItem = new StringItem("Hello", null); DataBinder.registerDataSet(getDataSet(), "dataSet"); DataBinder.bind("mydata.string", new StringItemBindingProvider(), getStringItem(), StringItemBindingProvider.FEATURE_TEXT); // write post-init user code here } return stringItem; } The generated code is incorrect because DataBinder.bind method uses "mydata" object name while the registered name of the dataset is "dataSet". Both names should be the same. I think user should be restricted somehow while setting up EL Read and EL Write expressions.
I agree it could be a problem special for less advanced users. To be honest Expression Language could be sometime very complex and I'm not able to parse EL Read/Write to check it if it's correct in Runtime. Solution for this problem is to limit functionality of the EL field just to the simplest use case (like is describe in this issue). I think it'd be the best to leave current functionality as it is and leave decision about EL fields completely up to user. Anyway this feature needs to be closely evaluate it.
I made mistake in previous comment instead if "to check it if it's correct in Runtime." should be "to check it if it's correct in Design Time" I'm sorry.