Posts Tagged ‘component’

Extjs: How to extend a component 2010/01/21 1 Comment

As extjs is a powerful javascript framework, sometimes we wanna do some extends for some reasons. But how to extend a component in extjs?

I take a extended TextField named as “xTextField” for example. The “xTextField” is inherited from “Ext.form.TextField”, code like below:

<script type="javascript">
Sm = {}; Sm.form = {};
Sm.form.xTextField = Ext.extend(Ext.form.TextField, {
    fieldLabel: ”,
  [...]