开发者

What is the significance of following?

开发者 https://www.devze.com 2023-02-16 20:21 出处:网络
I\'m very new to EXTJS.I want to know the concepts of following. Ext.BLANK_IMAGE_URL = \'folder_closed.gif\';

I'm very new to EXTJS.I want to know the concepts of following.

       Ext.BLANK_IMAGE_URL = 'folder_closed.gif';
    Ext.QuickTips.init();
    Ext.form.VTypes["nameVal"]  = /^([A-Z]{1})[A-Za-z\-]+ ([A-Z]{1})[A-Za-z\-]+/;
    Ext.form.VTypes["nameMask"] = /[A-Za-z\- ]/;
    Ext.form.VTypes["nameText"] = 'In-valid Director Name.';
    Ext.form.VType开发者_运维技巧s["name"]     = function(v){
        return Ext.form.VTypes["nameVal"].test(v);

and also what does the "renderTo:document.body" do ....?


The first bit of code registers a so-called vtype which is a validation-element that can be used to validate to textfield form elements simply by applying a vtype-attribute. In your case the vtype-name would be name.

{
    ...
    xtype: "textfield",
    vtype: "name",
    ...
}

The renderTo property does the following (from the ExtJS documentation):

Specify the id of the element, a DOM element or an existing Element that this component will be rendered into.

Although the learning curve is steep with ExtJS, you should read the API documentation - almost all questions can be answered from there (including both of your questions).

0

精彩评论

暂无评论...
验证码 换一张
取 消