widget - Extjs add listener after page load -


i'm documentum xcp developer, xcp ui developed in extjs , have tool create ui. in ui have 1 option set initial value widget. can call function set initial value

my requirement restrict user entering hyphen in number field , numeric values in text field.

on page have menubar , items linked page. want added "afterrender" listener page.

var page = ext.componentquery.query('panel[title=document search]')[0]; page.on("afterrender", function(){ alert('after render called ...');  }); 

thanks in advance

have tried use vtype in textfield?

more informations here : http://docs.sencha.com/extjs/4.2.2/#!/api/ext.form.field.vtypes

for example :

{     xtype: 'textfield',     name: 'email',     fieldlabel: 'email address',     vtype: 'email'  // requires value valid email address format } 

in example, creating textfield allows email address. have 4 types of "vtype" :

  • alpha
  • alphanum
  • email
  • url

it's possible create custom vtype example doc :

    // custom vtype vtype:'time'     var timetest = /^([1-9]|1[0-9]):([0-5][0-9])(\s[a|p]m)$/i;     ext.apply(ext.form.field.vtypes, {         //  vtype validation function         time: function(val, field) {             return timetest.test(val);         },         // vtype text property: error text display when validation function returns false         timetext: 'not valid time.  must in format "12:34 pm".',         // vtype mask property: keystroke filter mask         timemask: /[\d\s:amp]/i     }); 

hope helpful problem!


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -