Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "JFace Data Binding/Binding"

(Value Bindings)
Line 2: Line 2:
 
{{JFace Data Binding}}
 
{{JFace Data Binding}}
 
== Value Bindings ==
 
== Value Bindings ==
A value binding binds two <code>IObservableValue</code> instances. The order of phases are:
+
A value binding binds two <code>IObservableValue</code> instances. The order of phases are:
 
=== Validate After Get ===
 
=== Validate After Get ===
 
Validation of the value before conversion.  This phase can be used to ensure that conversion will succeed.
 
Validation of the value before conversion.  This phase can be used to ensure that conversion will succeed.

Revision as of 12:29, 22 April 2007

Bindings synchronize the values of 2 observables in JFace Data Binding. The synchronization process is comprised of phases of validation and conversion. The specific phases available are dependant upon the type of binding.

JFace Data Binding
Home
How to Contribute
FAQ
Snippets
Concepts
Binding
Converter
Observable
Realm

Value Bindings

A value binding binds two IObservableValue instances. The order of phases are:

Validate After Get

Validation of the value before conversion. This phase can be used to ensure that conversion will succeed.

Convert

Converts the value to the expected type.

Validate After Convert

Validates the converted value.

Validate Before Set

Validates before setting the value. The only difference between 'before set' and 'after convert' is a conceptual one. Before set can be used to perform expensive validation that should be deferred until the value is copied to the model. This comes in handy in a dialog setting where validation should occur before the changes are committed.

Set Value

The value is set on the opposite observable. This stage is exposed in UpdateValueStrategy to allow the consumer to persist changes when the value is set.

List Bindings

A list binding binds two IObservableList instances. The order of phases are:

Convert

Convert the value to the expected type.

Add/Remove

Update the opposite observable with the change.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.