Hi, I have an edit screen that uses a PropertyChangeListener to listen for changes to a particular attribute and then format the screen accordingly. But the listener only works about 70% of the time. Sometimes when invoking the editor, changing the lookup value does nothing.
I am creating the listener in the postInit method. Is this proper?
Today, I upgraded from 6.8 to 6.9 snapshot. I’m not sure if this is relevant but I don’t recall having this problem in the past.
Groovy code:
@Override
protected void postInit() {
super.postInit()
getItem().addPropertyChangeListener(new Instance.PropertyChangeListener() {
@Override
void propertyChanged(Instance.PropertyChangeEvent e) {
String property = e.getProperty()
showNotification("Property (${property}) changed with value: ${e.getValue()}") //Does not always show
if(property == "someAttribute") {
//format screen
}
}
}
}