Boris Daich
Boris Daich

Reputation: 2461

JGoodies Binding: How to bind two ValueModels?

The simplified case is I have

ValueHolder a = new ValueHolder();

ValueHolder b = new ValueHolder();

I am looking for

[some JGoodies Class].[method](a,b);

That will connect those ValueModels and keep them mutually updated

I can not find among all static classes like PropertyConnector, Bindings, ObjectBinder etc do not have a method to connect two ValueModels

I am sure I am missing something.

My actual use case a little bit more complicated as I am building a reusable component that has calculated ValueModel and I need for a code that will use it to pass a ValueModel that will be bonded to it so the user will be able to do other complicated things with it.

Upvotes: 0

Views: 104

Answers (1)

Boris Daich
Boris Daich

Reputation: 2461

The simplest way

PropertyConnector.connect(valueModelA, "value", valueModelB, "value");

Upvotes: 0

Related Questions