Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The options parameter is an optional collection of name-value pairs that configure data structure that configures the Inline Edit component(s), as described below in the Options section.

...

Event

Type

Description

ParametersDefault

ListenerParameter Description

modelChanged

default

This event is fired any time the model for the component has changed, that is, any time the value of the text associated with the component has changed.

model, oldModel, sourcenone

model: The current (new) value of the "model" structure representing the editable state of the component
{{oldModel}}: A snapshot of the old value of the model structure before the current edit operation started
{{source}}: An arbitrary object which optionally represents the "source" of the change, which can be checked by listeners to prevent cyclic events. Can often be undefined.

onBeginEdit

"preventable"

This event fires just before the component switches from 'view' mode into 'edit' mode. Because the event is preventable, listeners may prevent the component from actually entering edit mode. 

none

afterBeginEdit

default

This event fires just after the component has finished entering 'edit' mode. 

none

onFinishEdit

"preventable"

This event fires just before the component switches out of 'edit' mode, i.e. before the newly edited value is stored in the model. Because the event is preventable, listeners may prevent the new value from being stored in the model, i.e. they may cancel the edit.

newValue, oldValue, editNode, viewNodenone

newValue, oldValue: see parameters for modelChanged
editNode: A DOM node which holds the concrete editable control - this may vary in interpretation for different embodiments of the InlineEdit control but may, for example be an <input>, <textarea> or <select> node,
viewNode A DOM node which holds the read-only representation of the editable value.

afterFinishEdit

default

This event fires just after the newly edited value is stored in the model. Note that it only fires if the onFInishEdit onFinishEdit event did not prevent the new value from being stored in the model.

newValue, oldValue, editNode, viewNodenone

newValue, oldValue, editNode, viewNode: See description for onFinishEdit

...

Functions

Code Block
javascript
javascript
fluid.inlineEdit.edit();

...