-
addEntry(e)
-
This function is called when the add entry button is clicked. We need to add a new element in edit mode.
Parameters:
Name |
Type |
Description |
e |
object
|
|
- Source:
-
constructor()
-
This constructor ensures that valid data has been set.
- Source:
-
createDNDAvatarNode(widget)
-
This creates the default Avatar DOM node for a MultipleEntryElement. It is nothing more than a basic
DIV element where the inner HTML is set to the value field of the widget value. This function should
be overridden by extending classes to make sure that the Avatar shows the appropriate information.
Parameters:
Name |
Type |
Description |
widget |
object
|
|
- Source:
-
-
This function should be extended by concrete implementations to create the element to go in the
element wrapper.
Parameters:
Name |
Type |
Description |
config |
object
|
The configuration to instantiate the element with |
- Source:
Returns:
A nwe MultipleEntryElement instance.
-
Type
-
object
-
createElementWrapper(elementConfig, previouslyExisted)
-
Creates the wrapper that wraps the widget. Calls "createElementWidget" to create the widget.
Parameters:
Name |
Type |
Description |
elementConfig |
object
|
|
previouslyExisted |
boolean
|
Indicates that the element previously existed. |
- Source:
-
createEntries()
-
This function is used to create all of the entries. It is provided for use at both widget
instantiation and when a new value is passed. It will iterate over the supplied array
and create wrappers and elements for each entry.
- Source:
-
deleteEntry()
-
Deletes the wrapper provided.
- Source:
-
dndCreator(item, hint) → {object}
-
This function is used to create drag and drop elements from the supplied item data. It is used
to construct BOTH avatars (the item when being dragged) and item templates. The item template is
constructed by the createElementWrapper function
Parameters:
Name |
Type |
Description |
item |
object
|
The item to create an avatar or element for |
hint |
string
|
Indicates what to create |
- Source:
Returns:
-
Type
-
object
-
getAcceptedDNDTypes() → {string[]}
-
This function is called to return the list of Drag-And-Drop types that are accepted by
the MultipleEntryCreator. By default it returns the value returned by calling the
"getDNDType" function as only element in an array. This function should be overridden
if the extending class wishes to support other types being droppped into it.
- Source:
Returns:
-
Type
-
string[]
-
-
This function is called whenever a Drag-And-Drop avatar is required. This takes the approach
that the item may not contain all the information available in the associated Drag-And-Drop
Source object so it retrieves all the currently selected nodes (when a Drag-And-Drop operation
starts the nodes being moved will be selected) and finds the widget mapped to the node of the
item supplied. This widget contains all of the information required to pass on to the
"createDNDAvatarNode" function.
Parameters:
Name |
Type |
Description |
item |
object
|
The item to create an object for |
- Source:
-
getDNDType() → {string}
-
This function returns the Drag-And-Drop type to assign to each element. By default
this returns "MultipleEntryElementWrapper". This function should be overridden by
extending classes to specify more specific data. This is especially important if
the accepted types that can be dropped needs to be constrained.
- Source:
Returns:
-
Type
-
string
-
getValue() → {object}
-
- Source:
Returns:
-
Type
-
object
-
postCreate()
-
Creates each element to display/edit
- Source:
-
postMixInProperties()
-
Set up the attributes to be used when rendering the template.
- Source:
-
setValue(value)
-
Parameters:
Name |
Type |
Description |
value |
object
|
|
- Source:
-
validate() → {boolean}
-
- Source:
Returns:
-
Type
-
boolean
-
validationRequired()
-
- Source: