form
form widget enables one binding for all controls and data inside the form.
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 eventParameters:
-
handler
{Function} A handler function to execute when the action is chosen.
-
context{Object}
Optional
Context in which the handler function should execute.
-
handler
-
onSubmit(handler, context) ¶Adds a listener for submit eventParameters:
-
handler
{Function} A handler function to execute when the action is chosen.
-
context{Object}
Optional
Context in which the handler function should execute.
-
handler
-
reset() ¶Resets the form.
- Fires:
- reset
-
setData(unwrappedData, bDontApply) ¶Set data to the form.Parameters:
-
bDontApply
-
unwrappedData
{Object} Data to be set
- Fires:
- setdata
-
bDontApply
-
submit() ¶Submits the form.
- Fires:
- submit
Events
-
reset(eventObj) ¶Fires when the form data is reset.Parameters:
-
eventObj{EventObject}
-
eventObj{EventObject}
-
setdata(eventObj) ¶Fires when the form data is set.Parameters:
-
eventObj{EventObject}
-
data{Object}
-
mapping{Object}
-
mappedData{Object}
-
data{Object}
-
eventObj{EventObject}
-
submit(eventObj) ¶Fires when the form data is submitted.Parameters:
-
eventObj{EventObject}
-
data{Object}
-
data{Object}
-
eventObj{EventObject}