javascript - Extjs refer to parent window from new window -


using extjs 5.0.1 have ext.toolbar.toolbar button. when click in button new window opened form inside. inside form need refer toolbar, using form.up('toolbar') don't work , return undefined. seems becouse new window not bind toolbar. don't want use getcmp becouse not using id property.

have idea?

you can use ext.componentquery.query find toolbar.

using xtype toolbar,it return array of objects.

 ext.componentquery.query('toolbar')[0]; 

if have more on toolbars,you can give unique itemid toolbar in config itemid:'buttontoolbar'.

 ext.componentquery.query('#buttontoolbar')[0]; 

similarly give unique name toolbar in config name:'buttontoolbar'.

ext.componentquery.query('toolbar[name=buttontoolbar]')[0]; 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -