The static members in an Ext JS class can be accessed without creating an object using Ext.create() method. It can be accessed using class name with dot notation same as other programming languages.
Declare static members in Ext JS class using 'statics' parameter as shown below.
Ext.define('Student', { name : 'unnamed', getName : function(){ alert('Student name is ' + this.name); }, constructor : function(studentName){ if(studentName) this.name = studentName; }, statics : { getSchoolName : function(){ return "XYZ"; } } }); //call static method alert(Student.getSchoolName());
As you can see in the above example, getSchoolName() function is defined inside statics parameter object. So now you can call it like Student.getSchoolName()
.
Try it on https://fiddle.sencha.com/#fiddle/3kv