Troubleshooting

   

Bean Properties Are Not Detected

The set of Bean properties reported by an application builder is incomplete.

Unless you're using a BeanInfo class or a Customizer, application builders and similar tools determine a Bean's properties based on method name patterns. For example, defining an integer field named fontSize in a Bean class isn't sufficient to have it recognized as a property. You need to declare appropriate setter and getter methods with the following sig natures:

 public void setFontSize( int value ) public int getFontSize() 

Bean Events Are Not Propagated

Changes in the bound properties of a Bean are not reflected in a dependent Bean.

The key to responding to property changes in a Bean is to implement the PropertyChangeListener interface. You implement this interface in a dependent Bean by providing a propertyChange method to respond to events. For this method to be called, you must also register the dependent Bean as a listener with the Bean of interest by calling its addPropertyChangeListener method. That Bean must make a firePropertyChange call whenever a bound property is modified. Verify that your implementation of propertyChange is checking for the correct property name when events are received.

   


Special Edition Using Java 2 Standard Edition
Special Edition Using Java 2, Standard Edition (Special Edition Using...)
ISBN: 0789724685
EAN: 2147483647
Year: 1999
Pages: 353

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net