Custom components in extjs3.x

Source: Internet
Author: User

Recently participated in the project used ExtJS, studied for several days, found that the actual development of a variety of layout components are used together as a custom component to improve code reuse.

In the project ' Add user ' function, because the user information is more, also may want to register its account information, therefore wants to add the time to fill in the final submission.

Flipping through the Extjs3.2 example found components that did not meet the requirements. So I tried to write one. I call it stepform for the time being.

1.Extjs can simulate the integration relationships in Java, allowing custom ' classes ' to be integrated from ExtJS ' classes ', such as ext. Panel,ext.window and so on.

So the first step is to create a new Stemform.js file and then use Ext.extend (ext.panel,{}) to integrate the Panel in EXT.

View Plain Ext.ns ("Util");       Util.stepform = Ext.extend (ext.panel,{//rewrite constructor, conf for custom parameters Constructor:function (conf) {},//Custom function Register:function () {}))

2. Rewrite the constructor of the panel constructor, write Util.StepForm.superclass.constructor.apply (this,[{...}) in the function To submit a custom parameter.

View Plain constructor:function (conf) {           var  items = conf.items;  //Click on the left link to toggle the different forms,       var  number = conf.number; //list shows numbers        //...                //several operations              util.stepform.superclass.constructor.apply (             this,[{  

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.