[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: [DataBinding] Changing value in a combo to an empty value doesn't update the model

I noticed that I could use a converter along with UpdateValueStrategy to change "" to null and achieve what I want. Is that the right approach?

Thanks
Ali.

Ali Naddaf wrote:
Hello all.

Have a simple question: if the set of values for a combo has an empty string (say, {"", "one", "two"}), when I change the value of drop down from "" to "one", my model gets updated but not when it changes from "one" to "". Is this the correct/intentional behavior and how can I get around that? I am using a binding like:

dbc.bindValue(SWTObservables.observeSelection(addOd),
    BeansObservables.observeValue(ss, "attribute"), null, null);

Many thanks,
Ali