form

form widget enables one binding for all controls and data inside the form.

  • Extends basecontrol
  • Syntax

    <div data-juci="form" data-bind="ref: formContent">
    	<div data-juci="display" data-bind="ref: key1"></div>
    	<div data-juci="text" data-bind="ref: key2"></div>
    </div>
    Beta feature. APIs and functionalities are subject to change.
    Button type submit and reset within a form, fire the form#event:submit and form#event:reset respectively when clicked.

    Attributes

    Methods

    • onReset(handler, context)
      Adds a listener for reset event
      Parameters:
      • handler
        {Function} A handler function to execute when the action is chosen.
      • context{Object} Optional
        Context in which the handler function should execute.
    • onSubmit(handler, context)
      Adds a listener for submit event
      Parameters:
      • handler
        {Function} A handler function to execute when the action is chosen.
      • context{Object} Optional
        Context in which the handler function should execute.
    • reset()
      Resets the form.
      Fires:
      reset
    • setData(unwrappedData, bDontApply)
      Set data to the form.
      Parameters:
      • bDontApply
      • unwrappedData
        {Object} Data to be set
      Fires:
      setdata
    • submit()
      Submits the form.
      Fires:
      submit

    Events

    • reset(eventObj)
      Fires when the form data is reset.
      Parameters:
    • setdata(eventObj)
      Fires when the form data is set.
      Parameters:
      • eventObj{EventObject}
        • data{Object}
        • mapping{Object}
        • mappedData{Object}
    • submit(eventObj)
      Fires when the form data is submitted.
      Parameters: