59
Name
Parameters
Description
fn (any): Function to execute
when the event occurs.
capture? (boolean): Whether
the listener is capturing.
(default value: false)
The control keeps a list of attached listeners and their handlers,
making it easier to remove them when the control is disposed
(see the dispose and removeEventListener method).
hod).
Failing to remove event listeners may cause memory leaks.
(inherited from Control).
.
applyTemplate(classNames,
template, parts,
namePart?): HTMLElement
classNames (string): Names
of classes to add to the
control's host element.
template (string): An HTML
string that defines the control
template.
parts (Object): A dictionary
of part variables and their
names.
namePart? (string): Name of
the part to be named after the
host element. This determines
how the control submits data
when used in forms.
Applies the template to a new instance of a control, and returns
the root element.
This method should be called by constructors of templated
controls. It is responsible for binding the template parts to the
corresponding control members.
For example, the code below applies a template to an instance of
an InputNumber control. The template must contain elements
nts
with the 'wj-part' attribute set to 'input', 'btn-inc', and 'btn-dec'.
dec'.
The control members '_tbx', '_btnUp', and '_btnDn' will be
assigned references to these elements.
this.applyTemplate('wj-control wj-inputnumber', template, {
{
_tbx: 'input',
_btnUp: 'btn-inc',
_btnDn: 'btn-dec'
}, 'input');
(inherited from Control).
.
beginUpdate()
Suspends notifications until the next call to endUpdate.
(inherited from Control).
constructor(element, options?) element (any): The DOM
element that hosts the control,
Initializes a new instance of the MultiSelect class.
(inherited from MultiSelect).