public abstract class UiBinding.Binding

  1. Object
  2. UiBinding.Binding

Binding allows us to have commit/auto-commit mode. This allows changes to properties to reflect immediately or only when committed, e.g. if a Form has “OK” & “Cancel” buttons you might want to do a commit on OK. We also provide a “rollback” method to reset to the original property values.

UiBinding has a boolean auto commit flag that can be toggled to set the default for new bindings.

Binding also provides the ability to disengage a “binding” between a property and a UI component

Constructors

public Binding()

Methods

public boolean isAutoCommit()Gets the autocommit value see #setAutoCommit(boolean)
public void setAutoCommit(boolean b)Toggles auto-commit mode and overrides the UiBinding autocommit default.
public abstract void commit()Set the value from the component into the property, note that this will throw an exception if autocommit is on
public abstract void rollback()Sets the value from the property into the component, note that this will throw an exception if autocommit is on
public abstract void disconnect()Clears the listeners and disengages binding, this can be important for GC as binding can keep object references in RAM

Inherited methods

Constructor details

Binding

public Binding()

Method details

isAutoCommit

public boolean isAutoCommit()
Gets the autocommit value see #setAutoCommit(boolean)

Returns

true if autocommit is on

setAutoCommit

public void setAutoCommit(boolean b)
Toggles auto-commit mode and overrides the UiBinding autocommit default. Autocommit instantly reflects changes to the property or component values.

Parameters

b boolean
true to enable auto-commit

commit

public abstract void commit()
Set the value from the component into the property, note that this will throw an exception if autocommit is on

rollback

public abstract void rollback()
Sets the value from the property into the component, note that this will throw an exception if autocommit is on

disconnect

public abstract void disconnect()
Clears the listeners and disengages binding, this can be important for GC as binding can keep object references in RAM