PDA

View Full Version : text of dockedItems



maria.chiamaia
21 Oct 2013, 1:48 AM
I have Tree panel.

everything works!;



Ext.define('My.Tree', {
extend:'Ext.tree.Panel',
id: 'DriveTree',
store: storeTree,


ChooseButtonText: 'ChooseFolder',
dockedItems: [{
xtype: 'toolbar',
items: [{
text: 'BUTTON TEXT', // this.ChooseButtonText
id:'connectButton',
},

]
}],


});



Ext.onReady(function(){
var tree =Ext.create('My.Tree', {});
});

But text of dockedItems want to be from tree Panel. something like this:

text:this.ChooseButtonText

I need this in order to create another JS, wich will transalte that texts. For instance:

sript -${lcoale}.js


Ext.define('My.Tree', {
override: 'Ext.tree.Panel',
title: 'Shecvlili',
ChooseButtonText: "refresh"
});

ettavolt
21 Oct 2013, 7:16 AM
With such approach you will need to do enormous amount of work pushing these strings to subcomponents.
You should try something like this (http://www.sencha.com/forum/showthread.php?142780) instead.