Skip to main content

Question on bijectiveBind

1 reply [Last post]
wangzaixiang
Offline
Joined: 2004-11-24

what i would is like the code

var map = new java.util.HashMap();

var name = bind map.get("name") with reverse;

name = "javafx";

and i hope that now, map.get("name") == "javafx".

In some a way, we may declare a reverse binding to a map and store changed data back.
But it looks that it not works in current's JavaFX.

Can somebody tell me a solution for this?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
michael_heinrichs
Offline
Joined: 2007-11-15

This does not work, because you are using a Java class and Java is not able to deal with bindings.

I am afraid the only solution at present is to write a new implementation of HashMap yourself, which allows this kind of functionality.