Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to use Ext.define in ExtJS 4

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 312
    Comment on it

    Ext.Define function is a part of EXTJs. ExtJS is a advance javascript framework, It used to create java class and their method by using javascript.

    I write the Ext.define method below :

    Ext.define ( String className, Object data, Function createdFn ) : Ext.Base

    Ext.define is used to define a class.

    Example:

    creates My.computer.NoteBook Class

    Ext.define('My.computer.NoteBook', {
    
         extend:'Ext.panel.Panel',
    
         config: {
    
              hardware:'Dell',
              os:'Linux',
              price:500
         },
    
         constructor:function(config) {
    
              this.initConfig(config);
    
              return this;
         }
    });
    

    creates instance of My.computer.NoteBook Class

    var myComputer = Ext.create('My.computer.NoteBook', {
    
         hardware:'MacBook Pro',
         os:'Mac OS X',
         price:1800
    });
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: