...
Event | Type | Description | Parameters | Parameter Description |
---|---|---|---|---|
| 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. | |
|
| "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 |
|
| default | This event fires just after the component has finished entering 'edit' mode. | none |
|
| "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. | |
|
| default | This event fires just after the newly edited value is stored in the model. Note that it only fires if the | |
|
...
Functions
These functions are defined on the central that
object returned from the inlineEdit construction function - for example with
Code Block | ||||
---|---|---|---|---|
| ||||
var that = fluid.inlineEdit(componentContainer, options); |
Code Block | ||||
---|---|---|---|---|
| ||||
that.edit();
|
Switches the component into edit mode. The events onBeginEdit
and afterBeginEdit
will fire.
Code Block | ||||
---|---|---|---|---|
| ||||
fluidthat.inlineEdit.finish(); |
Switches the component out of edit mode into display mode, updating the displayed text with the current content of the edit field. Calls the finishedEditing()
function provided in the options
, if it exists. NOTE that finishedEditing()
is deprecated as of version 0.6, and will be removed entirely in version 0.9.. The events onFinishEdit
and afterFinishEdit
will fire. If the model value has changed, there will be a call to modelUpdated
in between these calls.
Code Block | ||||
---|---|---|---|---|
| ||||
fluidthat.inlineEdit.renderrefreshView(source); |
Prompts the component to render itselfUpdates the state of the inline editor in the DOM, based on changes that may have happened to the model.
Code Block | ||||
---|---|---|---|---|
| ||||
fluid.inlineEditthat.tooltipEnabled(); |
Returns a boolean indicating whether or not the tooltip is enabled.
Code Block | ||||
---|---|---|---|---|
| ||||
fluid.inlineEditthat.updateModel(newValue, source); |
Updates the component's internal representation of the text to a new value. The If the value differs from the existing value, the modelChanged
event will fire and the component will be re-rendered.
Code Block | ||||
---|---|---|---|---|
| ||||
that.model
|
Not a function, but a data structure. This directly represents the "model" or state of the editable component. External users should consider this structure as read-only, and only make modifications through the updateModel
call above.
...
Anchor | ||||
---|---|---|---|---|
|
...