clear([sendUpdatedEvt])
Clear the field by setting the field value to this.options.value
Parameters:
sendUpdatedEvt <boolean>
optional
- (optional) Wether this clear should fire the updatedEvt or not (default is true, pass false to NOT send the event)
close()
Close the field and eventually opened popups...
destroy()
Purge all event listeners and remove the component from the dom
disable()
Disable the field
displayMessage(msg)
Update the message
Parameters:
msg <String>
- Message to display
enable()
Enable the field
fireUpdatedEvt()
Fire the "updated" event (only if the field validated)
Escape the stack using a setTimeout
<HTMLElement> getEl()
The default render creates a div to put in the messages
Returns:
<HTMLElement>
divEl The main DIV wrapper
<String> getState()
Returns the current state (given its value)
Returns:
<String>
One of the following states: 'empty', 'required', 'valid' or 'invalid'
getStateString(state)
Get the string for the given state
<Any> getValue()
Return the value of the input
initEvents()
Initialize events of the Input
isEmpty()
Should return true if empty
onBlur(e)
Function called on the blur event
Parameters:
e <Event>
- The original 'blur' event
onChange(e)
onChange event handler
Parameters:
e <Event>
- The original 'change' event
onFocus(e)
Function called on the focus event
Parameters:
e <Event>
- The original 'focus' event
render()
Default render of the dom element. Create a divEl that wraps the field.
renderComponent()
Render the interface component into this.divEl
setClassFromState()
Set the styles for valid/invalide state
setOptions(options)
Set the default values of the options
Parameters:
options <Object>
- Options object (inputEx inputParams) as passed to the constructor
setValue(value[,sendUpdatedEvt])
Function to set the value
Parameters:
value <Any>
- The new value
sendUpdatedEvt <boolean>
optional
- (optional) Wether this setValue should fire the updatedEvt or not (default is true, pass false to NOT send the event)
updatedEvt(value)
YAHOO custom event fired when the field is "updated"
subscribe with: this.updatedEvt.subscribe(function(e, params) { var value = params[0]; console.log("updated",value, this.updatedEvt); }, this, true);
Parameters:
value <Any>
- The new value of the field
<Boolean> validate()
Validation of the field
Returns:
<Boolean>
field validation status (true/false)