MODULES Uize.Widget.mWebBindings
1. Introduction
The Uize.Widget.mWebBindings module is an aggregator mixin module that allows widget classes to more easily mix in Uize.Widget.mWeb and other widget binding modules with additional helpful functionality.
DEVELOPERS: Ben Ilegbodu
1.1. Examples
There are no dedicated showcase example pages for the Uize.Widget.mWebBindings module.
SEARCH FOR EXAMPLES
Use the link below to search for example pages on the UIZE Web site that reference the Uize.Widget.mWebBindings module...
SEARCH
1.2. Implementation Info
The Uize.Widget.mWebBindings module defines the Uize.Widget.mWebBindings object under the Uize.Widget namespace.
1.2.1. Features Introduced in This Module
The features listed in this section have been introduced in this module.
STATIC PROPERTIES
Uize.Widget.mWebBindings.moduleName | Uize.Widget.mWebBindings.pathToResources
1.2.2. Features Overridden in This Module
No features have been overridden in this module.
1.2.3. Features Inherited From Other Modules
This module has no inherited features.
1.2.4. Modules Directly Under This Namespace
There are no modules directly under this namespace.
1.2.5. Unit Tests
There is no dedicated unit tests module for the Uize.Widget.mWebBindings module.
2. Instance Methods
2.1. webSelect
Selects descendent DOM nodes within the root node matching the specified selector, returning a Uize.Web object that wraps the node(s).
The selector is modified such that class selectors are appropriately prefixed with their cssClassPrefix and ID selectors are appropriately prefixed with their idPrefix.
SYNTAX
webOBJ = widgetOBJ.webSelect(selectorSTR);
EXAMPLE MARKUP
- Item 0
- Item 1
- Item 2
- Item 3
- Item 4
- Item 5
EXAMPLE CODE
var items = myList.webSelect('.item');
The code above returns a Uize.Web object with the 6 list item DOM nodes. The specified selector is transformed from ".item" to ".MyList-item" using the cssClass method (from Uize.Widget.mBindings) and then searches within the root node for matching DOM nodes.
EXAMPLE CODE 2
var thirdItem = myList.webSelect('#item2');
The code above returns a Uize.Web object with the DOM node that has an ID of "page_myList-item2". The specified selector is transformed from "#item2" to "#page_myList-item2" using the idPrefix method (from Uize.Widget) and then searches within the root node for matching DOM nodes.
An ID selector is equivalent to myList.web('item2').
EXAMPLE CODE 3
var selectedItem = myList.webSelect('li.selected');
The code above returns a Uize.Web object with the DOM node that has an ID of "page_myList-item4" because it is an
".MyList-seelcted".
NOTES
See related cssClass instance method of Uize.Widget.mBindings
|
|
See related idPrefix instance method of =Uize.Widget. |
|
See also Uize.Web object |