public static abstract class

FormCell.CellValueChangeListener

extends Object
java.lang.Object
   ↳ com.sap.cloud.mobile.fiori.formcell.FormCell.CellValueChangeListener<T>

Class Overview

A callback that notifies clients when the value of the control has been changed.

Summary

Fields
protected FormCell.CellChangeListenerMode cellChangeListenerMode
Public Constructors
CellValueChangeListener()
Public Methods
void beforeCellChanged(T value)
Notify that listener that cell is about to change
void cellChanged(T value)
Notify that listener that cell has changed
void cellChanged(T value1, T value2)
Notify that listener that cell has changed
void focusChanged(T value)
Notify that listener that focus on view has changed
FormCell.CellChangeListenerMode getCellChangeListenerMode()
Get the cell change listener mode.
void setCellChangeListenerMode(FormCell.CellChangeListenerMode cellChangeListenerMode)
Set the cell change listener mode.
CharSequence updatedDisplayText(T value)
Few form cells require to update some texts based on the current value on the cell.
Protected Methods
void cellChangeHandler(T value1, T value2)
Notify the application about the changes in the cell.
abstract void cellChangeHandler(T value)
Notify the application about the changes in the cell.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected FormCell.CellChangeListenerMode cellChangeListenerMode

Public Constructors

public CellValueChangeListener ()

Public Methods

public void beforeCellChanged (T value)

Notify that listener that cell is about to change

Parameters
value Value of the cell

public void cellChanged (T value)

Notify that listener that cell has changed

Parameters
value Value of the cell

public void cellChanged (T value1, T value2)

Notify that listener that cell has changed

Parameters
value1 First value of the cell
value2 Second value of the cell

public void focusChanged (T value)

Notify that listener that focus on view has changed

Parameters
value Value of the cell

public FormCell.CellChangeListenerMode getCellChangeListenerMode ()

Get the cell change listener mode.

Returns
  • Cell change listener mode

public void setCellChangeListenerMode (FormCell.CellChangeListenerMode cellChangeListenerMode)

Set the cell change listener mode. Listener mode provides control on when the application should be notified about the change on cell. There are 3 different modes available as FormCell.CellChangeListenerMode

Parameters
cellChangeListenerMode cell change listener mode

public CharSequence updatedDisplayText (T value)

Few form cells require to update some texts based on the current value on the cell. For example PickerFormCells need to show the last picked value even when the picker has collapsed. In order to perform this PickerFormCell needs to be updated about the text to show. Return value of this method is displayed on relevant view within FormCells.

Parameters
value Updated values
Returns
  • Text to be updated

Protected Methods

protected void cellChangeHandler (T value1, T value2)

Notify the application about the changes in the cell.

Parameters
value1 first changed value of the control values
value2 second changed value of the control values

protected abstract void cellChangeHandler (T value)

Notify the application about the changes in the cell.

Parameters
value changed value of the control values