ExtJS form takes a value assignment reset __js

Source: Internet
Author: User

First, three ways to get field from form:

1, ext.getcmp (' id ');

2, Formpanel.getform (). FindField (' Id/name ');

3, Ext.get (' id/name ');/The premise is that Formpanel is displayed on the interface.

Two, ExtJS how to give TextField three methods to assign a value:

var value= "value";

1, Fs.form.findField (id/name). SetValue (value);

2, Ext.get (Id/name). SetValue (value);

3, ext.getcmp (ID). SetValue (value);


Iv. automatic assignment of combo when Formpanel component load data

Combo has a hiddenname attribute, which is the actual value of the commit, and when you load this property into reader, you can automatically select the value you specify, such as: hiddenname: ' Value ', Then you should have a {name: ' value '} in your reader.

Five, ExtJS reset the form method:

There are three ways to reset form forms, assuming Var fs=new Ext.form.FormPanel ({...});
(1) Fs.form.reset ()//Reset Form
(2) Fs.getform (). Getel (). Dom.reset ();//Reset Form

(3) EXT.GETCMP (' FS '). Form.reset ();


Originated from: http://www.cnblogs.com/lidabo/archive/2013/02/19/2917876.html

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.