Code example for PropertyChangeEvent

Methods: getNewValue, getOldValue, getPropertyName, getSource

0
    public EntityObjectChangeSetDeltaPropertyChangeListener(EntityObjectEventSupport entityObjectEventSupport) {
        this.entityObjectEventSupport = entityObjectEventSupport;
    } 
 
    public void propertyChange(PropertyChangeEvent evt) {
        EntityObject source = (EntityObject) evt.getSource();
        Field field = source.getEntityDescriptor().getField(evt.getPropertyName());
        ChangeSetDelta<EntityObject> delta = new EntityObjectChangeSetDeltaImpl(source, field, evt.getOldValue(), evt.getNewValue());
        entityObjectEventSupport.fireEntityObjectChange(delta);
    } 
}