context.getSubview(viewId, requiredOrder)
Accesses a subview instance given the subview ID. This method is similar tocontext.subview[viewid] except that the return value is an array of subview instances.
viewId(String) – the view ID or control ID of the subview
requiredOrder (boolean) – (optional) indicates whether the array returned needs to maintain the same order as in the DOM tree. The default value is false.
The call this.context.getSubview(“viewid”) returns an unsorted array of subview objects. The call this.context.getSubview(“viewid”, false) returns exactly same array.
The only difference between the two calls and the function callthis.context.getSubview(“viewid”, true) is thatthis.context.getSubview(“viewid”, true) returns an array of subview objects whose order matches the order of the DOM nodes in the DOM tree.