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 117752 - Bindings to components lost after typing in Page bean source
Summary: Bindings to components lost after typing in Page bean source
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: _ deva
URL:
Keywords: REGRESSION
: 118302 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-04 11:29 UTC by _ alexpetrov
Modified: 2007-10-09 23:23 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (151.82 KB, image/jpeg)
2007-10-05 17:30 UTC, _ alexpetrov
Details
screenshot (147.86 KB, image/jpeg)
2007-10-05 17:30 UTC, _ alexpetrov
Details
screenshot (28.53 KB, image/jpeg)
2007-10-05 17:31 UTC, _ alexpetrov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ alexpetrov 2007-10-04 11:29:14 UTC
REGRESSION (see http://www.netbeans.org/issues/show_bug.cgi?id=112917).

Automated tests "CachedRowSetDataProvider_AcceptanceTests" shows that the bug #112917 is reproduced again -
DataProvider doesn't provide data to JSF component.

Product Version: NetBeans IDE Dev (Build 200710040000) 
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b02 
System: Windows XP version 5.1 running on x86

Scenario - tutorial "Performing Inserts, Updates, and Deletes".

1. Connect to DB Derby Travel.
2. Create new VWP project (Java EE 5, Classfish V2, Visual Web JavaServer Faces)
3. DnD Drop Down List on Designer. DnD DB table PERSON on it.
4. Use popupmenu item "Edit Event Handler -> processValueChange" for JSF component "dropDown1".
5. Save All and switch to Designer.

Result:
- JSF component "dropDown1" is still bound to "personDataProvider" (see a value of a property "items" 
  in the window "Properties"), 
  but JSF component on Designer doesn't contain items and lists "Value field" and "Display field" 
  are empty in the dialog "Bind to Data" (for "dropDown1")
Comment 1 John Baker 2007-10-04 19:03:05 UTC
Works for me

Step 5 I open bind to data for the Dropdown List and all fields for Person are available
(both value and display)
Comment 2 John Baker 2007-10-04 20:05:48 UTC
Here's the environment I tried and started IDE with no userdir

Product Version: NetBeans IDE Dev (Build 200710040000) 
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_02-b06
System: Windows XP version 5.1 running on x86

Cannot reproduce
Comment 3 John Baker 2007-10-04 20:06:03 UTC
Here's the environment I tried and started IDE with no userdir

Product Version: NetBeans IDE Dev (Build 200710040000) 
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06
System: Windows XP version 5.1 running on x86

Cannot reproduce
Comment 4 _ alexpetrov 2007-10-05 14:29:55 UTC
Product Version: NetBeans IDE Dev (Build 200710050000)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b02
System: Windows XP version 5.1 running on x86; Cp1251

Verified.
The bug is not reproduced on NB build #200710050000.
Comment 5 _ alexpetrov 2007-10-05 17:28:33 UTC
Product Version: NetBeans IDE Dev (Build 200710050000)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b02
System: Windows XP version 5.1 running on x86; Cp1251

BUG IS STILL REPRODUCED!

The 1st scenario is not reproduced, BUT a scenario of the bug http://www.netbeans.org/issues/show_bug.cgi?id=112917
is still reproduced (automated tests show this fact):

1. Connect to DB Derby Travel.
2. Create new VWP project (Java EE 5, Classfish V2, Visual Web JavaServer Faces)
3. DnD Drop Down List on Designer. Change its property "id" from "dropDown1" to "personDD".
   DnD DB table PERSON on it.
   Use popup menu:
   - set "Auto-Submit on Change" to ON.
   - "Configure Virtual Forms..." - add new virtual form: "person, Yes, Yes".
4. DnD JSF component Table on Designer.
   DnD DB table TRIP on it.

Result:
- see attached screenshot "screenshot_before_1.JPG" - JSF components are bound to DB tables properly.

5. Use popupmenu item "Edit Event Handler -> processValueChange" for JSF component "personDD"
   and insert the following java code inside the created method "personDD_processValueChange()"

   Object selectedPersonId = personDD.getSelected();
       try {
           personDataProvider.setCursorRow(
                   personDataProvider.findFirst("PERSON.PERSONID",
				   selectedPersonId));
           getSessionBean1().getTripRowSet().setObject(1, selectedPersonId);
           tripDataProvider.refresh();
           form1.discardSubmittedValues("save");
       } catch (Exception e) {
           error("Cannot switch to person " + selectedPersonId);
           log("Cannot switch to person " + selectedPersonId, e);
       }

6. Save All and switch to Designer.

Result:
- see attached screenshots "screenshot_after_2.JPG" & "screenshot_deployment_3.JPG " - JSF components are NOT bound to
DB tables.


John, please, try J2SDK 1.6.0_03...
Comment 6 _ alexpetrov 2007-10-05 17:30:02 UTC
Created attachment 50276 [details]
screenshot
Comment 7 _ alexpetrov 2007-10-05 17:30:45 UTC
Created attachment 50277 [details]
screenshot
Comment 8 _ alexpetrov 2007-10-05 17:31:30 UTC
Created attachment 50278 [details]
screenshot
Comment 9 John Baker 2007-10-05 17:56:15 UTC
Appears to be an insync bug.

It's much easier to reproduce:

1) Create new project
2) DnD a dropdown list
3) From the Travel connection, DnD the person table onto the dropdown list
4) Switch to the Page bean source and type one character
5) Switch back to the Design view

The binding is lost
Comment 10 John Baker 2007-10-05 18:03:54 UTC
Appears to be insync, reassigning

See desc 10 (previous evaluation)
Comment 11 John Baker 2007-10-05 18:19:52 UTC
Could be retouche?
After undo -ing what I type in Page1.java, the binding is still lost
Comment 12 John Baker 2007-10-06 08:23:09 UTC
Was something changed in data providers ?
Comment 13 _ deva 2007-10-08 07:50:35 UTC
This is happening because of not generating the dp.setCachedRowSet() statement in the _init() method of .java file, 
requires more investigation
Comment 14 _ deva 2007-10-08 22:35:25 UTC
Statement was not added because the changes to _init() was not cumulative. This got introduced because of performance 
enhancement(#94205)
Comment 15 _ alexpetrov 2007-10-09 12:33:42 UTC
Verified on
Product Version: NetBeans IDE Dev (Build 200710090000)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b02
System: Windows XP version 5.1 running on x86
Comment 16 John Baker 2007-10-09 23:23:03 UTC
*** Issue 118302 has been marked as a duplicate of this issue. ***