PDA

View Full Version : Ext.Panel: and custom data fields



PHPman
28 Mar 2011, 3:23 AM
Hello !

How I can add my own parameters/data before creating the panel, and then how to use them? I need to pass data to the panel's store object.
I apologize if some do not understand my explaination.


mytab = new Ext.Panel({
id:tabid,
title: tabTitle,
iconCls: tabIcon,
autoScroll: true,
layout: 'fit',
closable: true,
autoLoad:{
url:tabLink,
iframe:true,
mask:{}
}
myCustomData: {start_date:'2011-02-28'} // something like this....?
});Thank you.

kohyea
28 Mar 2011, 1:24 PM
Please POST a sample store data, and tell me what you want to do.

Kohyea

brittongr
28 Mar 2011, 4:48 PM
var url = 'page.php';
url += 'start_date=2011-02-28';

mytab = new Ext.Panel({
id:tabid,
title: tabTitle,
iconCls: tabIcon,
autoScroll: true,
layout: 'fit',
closable: true,
autoLoad:{
url:url,
iframe:true,
mask:{}
}
myCustomData: {start_date:'2011-02-28'} // something like this....?
});

PHPman
29 Mar 2011, 12:40 AM
url += 'start_date=2011-02-28';

Yes, this is the solution, but may be better to pass my data over javascript?
With this url, i load page with form and grid panel (with autoload store).
So i only need to pass my parameter to the store's initial config. I think no needed to send this data to the server and getting it back.