VisualAge seems to ignore changes my Customizer makes. What can I do?

Scott Stanchfield

VisualAge does not listen to your Customizer. It simply saves the values of each property before the edit and checks them after the edit.

If the properties of the bean being customized don't change, but something inside them does, you'll have some problems...

For example, if you had

  public class Address {
    public void setCity(String city) {...}
    public String getCity() {...}
    public void setState(String state) {...}
    public String getState() {...}

  public class Person {
    public Address getAddress() {...}
    public void setAddress(Address address) {...}

and your PersonCustomizer sets the city of the current address, the VCE won't know the Person bean has changed -- in reality it hasn't changed...

Your customizer should fire a property change to say "address has changed", but that's moot since VAJ doesn't listen anyway...


Two things you need to do:

  1. Define Person as a "hidden state" bean through the BeanInfo editor. This forces the VCE to serialize it and unpickle it at runtime.
  2. You may need to choose "Bean->regenerate code" in the VCE after changing the city or state, because the VCE may not realize the bean is "dirty".


See also