ExtJS (1)-ExtJS Selector

Source: Internet
Author: User

These months have officially begun using the ExtJS development project, and some of these months ' experience will be compiled into a series of blogs. Today is about the basics of ExtJS, how to get component and dom.element.


First, query queries

The following path is a query condition and is queried in a similar way to jquery

*ComponentqueryreturnComponent

ext.componentquery.query Span style= "font-size:14px;font-family: ' trebuchet MS '; color: #404040;" > (PATH)   Global search path condition component

C Omponent.query (PATH) component for searching the path condition within the scope of this component

*Dom.queryreturnDomnumberGroup

Ext. Query (Path,[root], [type], [single])

Path search Criteria

Root searches the DOM under the root

*Store.queryreturnExt.util.MixedCollection

Store.query (' name ', ' Boy ') store.queryby (function (record) {  return record.get (' name ') = = ' Girl ' && Record.get (' sex ') = = 1; });

Two, up and down

*Up (Stringselector, [number/mixedmaxDepth] ) : Ext.core.Element

selector : required, in string form, representing the component to match. Example: form, window, etc.

Maxdepth : Optional, which represents the maximum depth to match.

upmethod ofAPIThis is interpreted as: by simple selection, to obtain a matchingDom, using upmethod always returns aExt.core.Element, namelyext's components.


*Down (Stringselector, [BooleanReturndom] ) : HtmlElement/Ext.core.Element

selector: combobox, TextField, etc.

Returndom : Optional, Boolean type, if true , the return DOM node, instead of Ext.core.Element . The value defaults to false.

Downmethod ofAPIexplanation, by selector,to get any sub-components in depth, Downmethod, you should not include the component'sID, and it should be the component'sxtype.


This article is from the "Snow July" blog, please be sure to keep this source http://xuepiaoqiyue.blog.51cto.com/4391594/1408448

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.