View Full Version : Function to send variable to another Panel

24 Aug 2011, 2:32 PM
Hi there,

I really like this forum, this give me a lot of information.
But I can't find out why i do not get the this.firstName variable.
And the 'ListDemo.detailPanel.update(record.data);' does also not working properly
because when i press on 1 person, i get the textarea field, but when i press on the second person,
the textarea field is disappeared.

So which function do I need to send the data.firstName as variable to the ListDemo.detailPanel?

ListDemo.detailPanel = new Ext.Panel({
id: 'detailpanel',
tpl: 'Hello, {firstName}!',
layout: {
type: 'vbox',
align: 'stretch'
items: [{
flex: 4,
xtype: 'textareafield',
style: 'margin-right: 10px;',
id: 'textquery',
placeHolder: 'Hello'+ this.firstName

ListDemo.listPanel = new Ext.List({
id: 'indexlist',
store: ListDemo.ListStore,
itemTpl: '<div class="contact">{firstName} {lastName}</div>',
grouped: true,

listeners : {
itemtap : function(dataview, index, item, e) {
var store = dataview.getStore(),
record = store.getAt(index);
var name = record.data.firstName + " " + record.data.lastName;


24 Aug 2011, 3:49 PM
So, i'm looking to pass the variable. Anyone has any idea ?