United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6246059 : RFE: JavaBean bound/constrained property is not specified in the spec

Details
Type:
Enhancement
Submit Date:
2005-03-25
Status:
Open
Updated Date:
2012-03-23
Project Name:
JDK
Resolved Date:
Component:
client-libs
OS:
generic
Sub-Component:
java.beans
CPU:
generic
Priority:
P4
Resolution:
Unresolved
Affected Versions:
5.0
Targeted Versions:

Related Reports
Relates:

Sub Tasks

Description
There are two javabean property modifiers: bound or constarined. So any javabean property either simple or indexed may have or not such modifiers (see http://java.sun.com/docs/books/tutorial/javabeans/properties/index.html).

However the javadoc spec doesn't specify a type of a property.

In the source code there is @beaninfo tag but this tag is not oficial and doesn't affect to the html spec.

For example, there is a property java.awt.Component.setBackground(Color c) with no specification of binding. But in fact such a property is bound.

###@###.### 2005-03-25 16:07:20 GMT

                                    

Comments
EVALUATION

"In JavaBeans, constrained property setter methods are required to support the PropertyVetoException. This documents to the users of the constrained property that attempted updates may be vetoed." (C) JavaBeans specification, section 7.4.2
So it is not necessary to add some modifiers to annotate the property as constrained.

Current implementation assumes that every property of the bean is bound if the bean has the propertyChange event set:
public void addPropertyChangeListener(PropertyChangeListener listener);
public void removePropertyChangeListener(PropertyChangeListener listener);
It is not really true. Some properties can be non-bound. I suggest to introduce the @Bound annotation to annotate bound properties.
                                     
2007-09-27
EVALUATION

Yes, whether or not a property is bound and/or constrained is not consistantly documented.
###@###.### 2005-07-19 13:43:12 GMT
                                     
2005-07-19



Hardware and Software, Engineered to Work Together