Constructordijit.InlineEditBox

dojo.require("dijit.InlineEditBox");
defined in dijit/InlineEditBox.js

,

`, etc.) so that when you click it, an editor shows up in place of the original text. Optionally, Save and Cancel button are displayed below the edit widget. When Save is clicked, the text is pulled from the edit widget and redisplayed and the edit widget is again hidden. By default a plain Textarea widget is used as the editor (or for inline values a TextBox), but you can specify an editor such as dijit.Editor (for editing HTML) or a Slider (for adjusting a number). An edit widget must support the following API to be used: String getDisplayedValue() OR String getValue() void setDisplayedValue(String) OR void setValue(String) void focus()

,

Usage

function ()

parameter

type

description

params

Object

Optional.

srcNodeRef

DomNode

|

String

Jump to Properties

Functions

Back to top

dijit._Widget

Defined by

Construct the UI for this widget, setting this.domNode. Most widgets will mixin TemplatedWidget, which overrides this method.

Function

cancel

(focus

Boolean

:

)

Revert to display mode, discarding any changes made in the editor

Function

connect

(obj

Object

:

, event

String

:

, method

String

|

Function

:

)

dijit._Widget

Defined by

Connects specified obj/event to specified method of this object and registers for disconnect() on widget destroy. Special event: "ondijitclick" triggers on a click or enter-down or space-up Similar to dojo.connect() but takes three arguments rather than four.

Function

create

(params

Object

?

:

, srcNodeRef

DomNode

|

String

:

)

dijit._Widget

Defined by

Kick off the life-cycle of a widget

Function

destroy

(finalize

Boolean

:

)

dijit._Widget

Defined by

Destroy this widget, but not its descendants

dijit._Widget

Defined by

Recursively destroy the children of this widget and their descendants.

dijit._Widget

Defined by

Destroy this widget and it's descendants. This is the generic "destructor" function that all widget users should call to cleanly discard with a widget. Once a widget is destroyed, it's removed from the manager object.

dijit._Widget

Defined by

Destroys the DOM nodes associated with this widget

Function

disconnect

(handles

Object

:

)

dijit._Widget

Defined by

Disconnects handle created by this.connect. Also removes handle from this widget's list of connects

dijit._Widget

Defined by

Returns all the widgets that contained by this, i.e., all widgets underneath this.containerNode.

dijit._Widget

Defined by

Return true if this widget can currently be focused and false if not

dijit._Widget

Defined by

Checks the DOM to for the text direction for bi-directional support

dijit._Widget

Defined by

stub function. Override or connect to this method to receive notifications for when the widget moves out of focus.

Function

onChange

(value)

User should set this handler to be notified of changes to value

dijit._Widget

Defined by

Callback if someone tries to close the child, child will be closed if func returns true

dijit._Widget

Defined by

stub function. Override or connect to this method to receive notifications for when the widget moves into focus.

dijit._Widget

Defined by

Called after a widget's dom has been setup

dijit._Widget

Overrides

Called after the parameters to the widget have been read-in, but before the widget template is instantiated. Especially useful to set properties that are referenced in the widget template.

Function

postscript

(params

Object

?

:

, srcNodeRef

DomNode

|

String

:

)

dijit._Widget

Defined by

Function

save

(focus

Boolean

:

)

Save the contents of the editor and revert to display mode.

Function

setAttribute

(attr

String

:

, value)

dijit._Widget

Defined by

Set native HTML attributes reflected in the widget, such as readOnly, disabled, and maxLength in TextBox widgets.

Function

setDisabled

(disabled

Boolean

:

)

Set disabled state of widget.

inserts specified HTML value into this node, or an "input needed" character if node is blank

dijit._Widget

Defined by

Called after a widget's children, and other widgets on the page, have been created. Provides an opportunity to manipulate any children before they are displayed. This is useful for composite widgets that need to control or layout sub-widgets. Many layout widgets can use this as a wiring phase.

dijit._Widget

Defined by

stub function. Override to implement custom widget tear-down behavior.

display the editor widget in place of the original (read only) markup

revert to display mode, and optionally focus on display node

Jump to Functions

Properties

Back to top

dijit._Widget

Defined by

A map of attributes and attachpoints -- typically standard HTML attributes -- to set on the widget's dom, at the "domNode" attach point, by default. Other node references can be specified as properties of 'this'

Changing the value automatically saves it; don't have to push save button (and save button isn't even displayed)

Cancel button label

Save button label

dijit._Widget

Defined by

HTML class attribute

dijit._Widget

Defined by

Unsupported by Dijit, but here for completeness. Dijit only supports setting text direction on the entire document. Bi-directional support, as defined by the HTML DIR attribute. Either left-to-right "ltr" or right-to-left "rtl".

dijit._Widget

Overrides

this is our visible representation of the widget! Other DOM Nodes may by assigned to other properties, usually through the template system's dojoAttachPonit syntax, but the domNode property is the canonical "top level" node in widget UI.

Is the node currently in edit mode?

Class name for Editor widget

Set of parameters for editor, like {required: true}

dijit._Widget

Defined by

a unique, opaque ID string that can be assigned by users or by the system. If the developer passes an ID which is known not to be unique, the specified ID is ignored and the system-generated ID is used instead.

dijit._Widget

Defined by

Rarely used. Overrides the default Dojo locale used to render this widget, as defined by the HTML LANG attribute. Value must be among the list of locales specified during by the Dojo bootstrap, formatted according to RFC 3066 (like en-us).

The text that gets displayed when there is no value (so that the user has a place to click to edit)

Set this to true if the specified Editor's value should be interpreted as HTML rather than plain text (ie, dijit.Editor)

dijit._Widget

Defined by

pointer to original dom node

dijit._Widget

Defined by

HTML style attribute

The display value of the widget in read-only mode

Width of editor. By default it's width=100% (ie, block mode)


Behavior for an existing node (`