Skip to main content



      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 07:15 Go to next message
Eclipse UserFriend
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 10: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: Tue Jul 01 13:01:13 EDT 2025

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

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

Back to the top