|Observing map doesn't update the UI [message #1130596]
||Wed, 09 October 2013 18:47
| ALex W
Registered: July 2012
I'm struggling here with an issue that's probably easy.
I have several button in my GUI.Each button should be enabled/disabled depending on a context. I have a Map<String, Boolean> containing a row for each button, telling if it should be enabled or not.
The value of the map BEFORE adding the binding is taken into account (button disabled if value at false, enabled otherwise) but not AFTER.
It's the first time I'm using bindings with maps, so maybe there is something I'm missing here.
Here is my code :
actionState = new WritableMap(String.class, Boolean.class);
IObservableMap modelMapObservable = Properties.selfMap(String.class, Boolean.class).observe( actionState );
IObservableValue modelObservable = Observables.observeMapEntry(modelMapObservable, actionId, Boolean.class);
IObservableValue controlObservable = WidgetProperties.enabled().observe( widget );
When changin the value using actionState.put(action, true) or actionState.put(action, false) doesn't change anything.
I've already googled it, but can't find any answers...
Any idea ?
[Updated on: Wed, 09 October 2013 18:56]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01975 seconds