Bug 123536 - On demand binding attribute
On demand binding attribute
Status: RESOLVED FIXED
Product: obsolete
Classification: Unclassified
Component: visualweb
6.x
All All
: P2 (vote)
: 6.x
Assigned To: _ sandipchitale
issues@obsolete
http://wiki.netbeans.org/wiki/view/On...
: PERFORMANCE
: 123817 (view as bug list)
Depends on:
Blocks: 116936
  Show dependency treegraph
 
Reported: 2007-12-06 06:17 UTC by Mark Dey
Modified: 2008-01-15 22:48 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Dey 2007-12-06 06:17:22 UTC
As of NetBeans 6.0, the VW requires that every component tag in the VW JSP page have the binding attribute which is bound using a value binding expression 
to a property of the backing page bean. This leads to bloating of the page bean especially with a page containing many components. Attribute binding should 
be optional
Comment 2 Winston Prakash 2007-12-13 21:27:40 UTC
*** Issue 123817 has been marked as a duplicate of this issue. ***
Comment 3 Winston Prakash 2007-12-13 21:34:11 UTC
Some performance measurements regarding the binding attribute removal:
http://wiki.netbeans.org/wiki/view/OnDemandBindingAttributePreliminaryResults
Comment 4 _ deva 2007-12-14 00:28:01 UTC
Non-UI changes for insync involving the following are done
1)No binding by default for components. They will be added whenever required such as while persisting property in java 
source
2)Markup beans are created based on jsp source and do not rely on java source
Comment 5 jsr 2007-12-19 16:04:30 UTC
I read the spec and did not see any mention of cleaning up existing sources. Those of us who have projects created in
previous versions would benefit greatly from a way to clean up all of the unused bindings that were already created.
Manually selecting "Remove Binding Attribute" for every component on every page in a project would be very tiresome.
Even if this was an unsupported plugin, it would still be very helpful.

Along the same lines, it would be nice if there was an option for "Fix Binding Attributes" that would work much like the
"Fix Imports" option. The option would remove any binding attributes that are not used in the backing bean java file and
add any that are used without the binding actually existing.
Comment 6 Winston Prakash 2008-01-02 20:08:40 UTC
"Fix Binding Attribute" is a one time requirement for imported project. 
Probably it makes sense to provide autoupdate module to do such clean up.
Comment 7 _ sandipchitale 2008-01-05 01:39:07 UTC
Implemented the Add Binding Attribute and Remove Binding Attribute actions. See
the issue and http://wiki.netbeans.org/wiki/view/OnDemandBindingAttribute
for more details.

TODO: Handle the case when there are references to the property in user code
while performing the Remove Binding Attribute action.

Checking in src/org/netbeans/modules/visualweb/insync/mf-layer.xml;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/mf-layer.xml,v  <--  mf-layer.xml
new revision: 1.4; previous revision: 1.3
done
RCS file: /cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/action/AddRemoveBindingAttributeAction.java,v
done
Checking in src/org/netbeans/modules/visualweb/insync/action/AddRemoveBindingAttributeAction.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/action/AddRemoveBindingAttributeAction.java,v  <-- 
AddRemoveBindingAttributeAction.java
initial revision: 1.1
done
Checking in src/org/netbeans/modules/visualweb/insync/action/Bundle.properties;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/action/Bundle.properties,v  <--  Bundle.properties
new revision: 1.3; previous revision: 1.2
done
Checking in src/org/netbeans/modules/visualweb/insync/beans/BeansUnit.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/beans/BeansUnit.java,v  <--  BeansUnit.java
new revision: 1.22; previous revision: 1.21
done
Checking in src/org/netbeans/modules/visualweb/insync/faces/FacesBean.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/faces/FacesBean.java,v  <--  FacesBean.java
new revision: 1.8; previous revision: 1.7
done
Checking in src/org/netbeans/modules/visualweb/insync/faces/MarkupBean.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/faces/MarkupBean.java,v  <--  MarkupBean.java
new revision: 1.7; previous revision: 1.6
done
Comment 8 Winston Prakash 2008-01-05 04:01:57 UTC
CVS update: /visualweb/jsfsupport/src/org/netbeans/modules/visualweb/jsfsupport/container/

User: wjprakash
Date: 2008/01/03 18:27:36

Modified:
   visualweb/jsfsupport/src/org/netbeans/modules/visualweb/jsfsupport/container/FacesContainer.java
   visualweb/jsfsupport/src/org/netbeans/modules/visualweb/jsfsupport/container/JsfTagSupport.java
   visualweb/jsfsupport/src/org/netbeans/modules/visualweb/jsfsupport/container/Bundle.properties

CVS update: /visualweb/project/jsf/src/org/netbeans/modules/visualweb/project/jsf/resources/templates/
User: wjprakash
Date: 2008/01/04 11:10:55

Modified:
   visualweb/project/jsf/src/org/netbeans/modules/visualweb/project/jsf/resources/templates/Page.java.template
   visualweb/project/jsf/src/org/netbeans/modules/visualweb/project/jsf/resources/templates/Page.jsp.template
Comment 9 _ deva 2008-01-12 03:28:10 UTC
Added methods in FacesBean to
 1)Check the usage of bean binding to notify user if component binding can be removed or not
 2)Remove component bean binding. This also removes any property set statements for the bean in _init() method

Checking in faces/FacesPageUnit.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/faces/FacesPageUnit.java,v  <--  FacesPageUnit.java
new revision: 1.17; previous revision: 1.16
done
Checking in faces/FacesBean.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/faces/FacesBean.java,v  <--  FacesBean.java
new revision: 1.9; previous revision: 1.8
done
Checking in java/JavaClass.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/java/JavaClass.java,v  <--  JavaClass.java
new revision: 1.17; previous revision: 1.16
done
Checking in beans/BeansUnit.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/beans/BeansUnit.java,v  <--  BeansUnit.java
new revision: 1.23; previous revision: 1.22
done
Comment 10 _ deva 2008-01-15 21:30:27 UTC
Changes to update the property sheet when the component binding attribute is removed. Also code cleanup
Checking in live/FacesDesignBean.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/live/FacesDesignBean.java,v  <--  FacesDesignBean.java
new revision: 1.3; previous revision: 1.2
done
Checking in action/AddRemoveBindingAttributeAction.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/action/AddRemoveBindingAttributeAction.java,v  <--  
AddRemoveBindingAttributeAction.java
new revision: 1.2; previous revision: 1.1
done
Checking in java/JavaClass.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/java/JavaClass.java,v  <--  JavaClass.java
new revision: 1.18; previous revision: 1.17
done
Checking in beans/BeansUnit.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/beans/BeansUnit.java,v  <--  BeansUnit.java
new revision: 1.24; previous revision: 1.23
done
Checking in faces/FacesBean.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/faces/FacesBean.java,v  <--  FacesBean.java
new revision: 1.10; previous revision: 1.9
done
Comment 11 _ sandipchitale 2008-01-15 22:48:02 UTC
Additional change to Remove Binding Attribute action.
Check for binding usage before removing the binding.

Checking in src/org/netbeans/modules/visualweb/insync/action/AddRemoveBindingAttributeAction.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/action/AddRemoveBindingAttributeAction.java,v  <-- 
AddRemoveBindingAttributeAction.java
new revision: 1.3; previous revision: 1.2
done
Checking in src/org/netbeans/modules/visualweb/insync/action/Bundle.properties;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/action/Bundle.properties,v  <--  Bundle.properties
new revision: 1.4; previous revision: 1.3
done


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo