JDK-6246059 : RFE: JavaBean bound/constrained property is not specified in the spec
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.beans
  • Affected Version: 5.0
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2005-03-25
  • Updated: 2012-03-23
Related Reports
Relates :  
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