Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Best way to make data-binding conditional
Best way to make data-binding conditional [message #1802524] Mon, 11 February 2019 12:15 Go to next message
Linuxhippy Mising name is currently offline Linuxhippy Mising nameFriend
Messages: 71
Registered: July 2009
Member
It it possible to make data-binding conditional, e.g. only synchronize between model and target in case an IObservableValue<Boolean> is true?

Some background: We are running an application which hides SWT widgets in case the user has no permissions to view the data contained in it. However we observed hiding is not enough - what might work for native platforms breaks for RAP.
At least when using RAP the data is still in the JSON sent from the server to the client, so in case the user has no permissions I would like data binding to assign "" instead of real values to the widgets.
Re: Best way to make data-binding conditional [message #1802532 is a reply to message #1802524] Mon, 11 February 2019 15:07 Go to previous message
Eclipse UserFriend
You can use a ComputedValue as an intermediate value. Or the ISideEffects class might be even better. There are some examples at the snippets page:

https://wiki.eclipse.org/JFace_Data_Binding/Snippets
Previous Topic:AutoCompleteField with comma-separated values?
Next Topic:ModalContext.setAllowReadAndDispatch does not work correct as comment
Goto Forum:
  


Current Time: Thu Apr 18 02:04:42 GMT 2024

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

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

Back to the top