class SAPO.Component.InputList
 requires SAPO.Dom.Event
 requires SAPO.Dom.Element
 requires SAPO.Dom.Css
 
Defined in Component/InputList/0.1/lib.js

Constructor Summary
InputList (String|DomElement container, Object options)

Function Summary
- returns the set of filled-in values
Public push (String value)
pushes a new input element at the end of the list (prior to the empty one)
Public remove (Number index)
Remove an element
Public update (Number index, String value)
Remove an element

Constructor Details

constructor InputList

InputList(String|DomElement container, Object options)
Parameters:
container -
options
  • [ String[] values ] - the initial set of values
  • [ Function(op, index, value) onChange ] - callback when something changes (operation: -1 for removal, 0 change, 1 addition; index: starts at 0, value)

Function Details

function getValues

String[] getValues()
- returns the set of filled-in values

function push

Public push(String value)
pushes a new input element at the end of the list (prior to the empty one)
Parameters:
value the default value for the new input

function remove

Public remove(Number index)
Remove an element
Parameters:
index
Returns:
{Boolean} success

function update

Public update(Number index, String value)
Remove an element
Parameters:
index
value
Returns:
{Boolean} success