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: 53
Registered: July 2009
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
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 876
Registered: January 2012
Senior Member

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:

Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Previous Topic:AutoCompleteField with comma-separated values?
Next Topic:ModalContext.setAllowReadAndDispatch does not work correct as comment
Goto Forum:

Current Time: Mon Aug 03 21:15:14 GMT 2020

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

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

Back to the top