Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Observing map doesn't update the UI
Observing map doesn't update the UI [message #1130596] Wed, 09 October 2013 18:47 Go to next message
ALex W is currently offline ALex WFriend
Messages: 56
Registered: July 2012
Member
Hello,

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 );
getBindingContext().bindValue(controlObservable, modelObservable);


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 ?

Thanks

[Updated on: Wed, 09 October 2013 18:56]

Report message to a moderator

Re: Observing map doesn't update the UI [message #1131687 is a reply to message #1130596] Thu, 10 October 2013 18:37 Go to previous message
ALex W is currently offline ALex WFriend
Messages: 56
Registered: July 2012
Member
Please, almost 500 views, and nobody has a clue ?

Thanks
Previous Topic:JFace Treviewer: How to handle a "Post"-Collapse/-Expand in TreeViewer
Next Topic:Export TableViewer data to a file
Goto Forum:
  


Current Time: Fri Sep 20 00:32:13 GMT 2024

Powered by FUDForum. Page generated in 0.26379 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top