View Full Version : How to load/save data from several tabs

14 Mar 2010, 5:27 AM
Assuming i have 2 tabs

var Tab1 = new Ext.FormPanel({});
var Tab2 = new Ext.FormPanel({});

placed in

var Window = new Ext.Window({
items: [Tab1, Tab2]

how can I combine 2 Tabs and send it to load({}); function

This is the way to load only one tab at once:

params: {act: 'getID', id: getID()},
success: function () {
failure: function () {
Ext.MessageBox.alert ('Failed','Fail');

code is obviously wrong but it shows the whole idea:


14 Mar 2010, 6:05 AM
You shouldn't create two FormPanels, but a single one and add two tabpanels to it. There is an example of how to do it here (http://www.extjs.com/forum/showthread.php?t=92267).

Mike Robinson
15 Mar 2010, 6:35 AM
A FormPanel probably will grab and properly handle all of the field-objects inside of it ... but you might have to override the "stock" ExtJS object-class in some cases. Fortunately the source-code is there, so you can see what the "out of the box" designers did.