Announcement Announcement Module
Collapse
No announcement yet.
databinding : bean propertychange notification Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • databinding : bean propertychange notification

    Hello,

    I have a question about the binding module.
    I have a bean (class A) wich is composed of several other classes (class B).

    class A implements PropertyChangePublisher {
    ...
    List <B> myList;


    }

    class B {
    int prop;
    public void setProp(int prop)
    {
    int oldProp = this.prop;
    this.prop = prop;
    firePropertyChange("prop", oldProp, prop);
    }
    }

    The "A" bean implements PropertyChangePublisher so that my FormModel gets
    notification when one of its property has changed.
    I'd like my FormModel to be notified when a property of a "B" object has changed .
    What is the best (cleanest) way to do this ?

    Thank you,

    Christophe.

  • #2
    databinding : bean propertychange notification

    Have a look at all sample projects(petclinic, sample) and HeirararchicalFormModel, it should be easy to follow those ulti source codes.
    AFAIK Spring RCP manages the rest for you without you needing to fire property changes from the bean which was the way with JGoodies binding.

    Regards,
    Prashant.

    Comment


    • #3
      thank you Prashant,

      I will dig in the code.

      Regards,

      Christophe.

      Comment

      Working...
      X