API Docs for: 0.1.0
Show:

Collection Class

Constructor

Collection

(
  • [options]
)

Parameters:

  • [options] Object optional

    configuration object

    • [min] Number optional

      min default min items

    • [max] Number optional

      max default max items

    • [singleValue] String optional

      singleValue property name of single value

Methods

addChild

(
  • index
  • item
  • template
  • propertyName
)
Object

add a child to this.$el but on

Parameters:

  • index Number

    for resulting $item dom element

  • item Object

    data for resulting $item dom element

  • template String

    to render $item

  • propertyName String

    name of property

Returns:

Object:

deferred objects that´s indicates end of asynchronous functions

canAdd

() Boolean

returns TRUE if a child can be added for given property

Returns:

Boolean:

canRemove

() Boolean

returns TRUE if a child can be removed for given property

Returns:

Boolean:

getChildren

(
  • propertyName
)
Array

returns children for given property

Parameters:

  • propertyName String

Returns:

Array:

getMaxOccurs

(
  • propertyName
)
Number

returns min occurs

Parameters:

  • propertyName String

Returns:

Number:

getMinOccurs

(
  • propertyName
)
Number

returns min occurs

Parameters:

  • propertyName String

Returns:

Number:

getValue

(
  • propertyName
  • returnMapperId
)
Array

returns data array

Parameters:

  • propertyName String
  • returnMapperId String

Returns:

Array:

initializeSub

()

initialize templates

internalSetValue

(
  • templates
  • value
  • propertyName
)
Object

maps given array (value) with given templates to this.$el

Parameters:

  • templates Object

    includes tpl and empty template

  • value Array

    array of data

  • propertyName String

    name of property

Returns:

Object:

deferred objects that´s indicates end of asynchronous functions

needsValidation

() Boolean

indicates data to validate

Returns:

Boolean:

setValue

(
  • data
  • propertyName
)
Object

map value to this.$el

Parameters:

  • data Array
  • propertyName String

Returns:

Object:

deferred objects that´s indicates end of asynchronous functions

validate

() Boolean

validates this type of data

Returns:

Boolean: