new RelationWidget()
- Source:
Extends
- enyo.Control
Methods
-
addParameter(Parameter, Editable) → {Object}
-
Add a parameter to the query object on the widget. Parameter conventions should follow those described in the documentation for `XM.Collection`.
Parameters:
Name Type Description Parameter
Object Editable
Boolean default false. If true user can edit parameter selection in search. - Source:
Returns:
Receiver- Type
- Object
-
autocomplete()
-
Fill the value with the selected choice.
-
clear()
-
Empty out the widget
-
disabledChanged()
-
- Source:
- To Do:
-
- Document the disabledChanged method.
-
fetchCollection()
-
Query the database. Used by both autocomplete and keyup.
-
focus()
-
- Source:
- To Do:
-
- Document the focus method.
-
getValueToString()
-
- Source:
- To Do:
-
- Document the getValueToString method.
-
itemSelected()
-
- Source:
- To Do:
-
- Document the itemSelected method.
-
keyDown()
-
- Source:
- To Do:
-
- Revisit or remove after ENYO-1104 is resolved.
-
keyUp()
-
We will typically want to query the database upon every keystroke
-
labelChanged()
-
- Source:
- To Do:
-
- Document the labelChanged method.
-
listChanged()
-
- Source:
- To Do:
-
- Document the listChanged method.
-
menuItemSelected()
-
- Source:
- To Do:
-
- Document the menuItemSelected method.
-
modelChanged()
-
- Source:
- To Do:
-
- Document the modelChanged method.
-
placeholderChanged()
-
When we get a placeholder we want to actually display it.
-
receiveBlur()
-
- Source:
- To Do:
-
- Document the receiveBlur method.
-
receiveFocus()
-
- Source:
- To Do:
-
- Document the receiveFocus method.
-
relationSelected()
-
- Source:
- To Do:
-
- Document the relationSelected method.
-
removeParameter(Attribute) → {Object}
-
Removes a query parameter by attribute name from the widget's query object.
Parameters:
Name Type Description Attribute
String Returns:
Receiver- Type
- Object
-
setValue(Value;, options)
-
Programatically sets the value of this widget. If an id is set then the correct model will be fetched and this function will be called again recursively with the model. In case of "order" models, each order's workspace is different depending on the order type. This causes the Workspace var to be null so get the value from the getWorkspace defined on the relation.js sub-kind.
Parameters:
Name Type Description Value;
XM.Model | Number | String can be a model or the id of a model. options
Object