PDA

View Full Version : FormPanel render error !



quockhanh82
25 Jan 2008, 2:30 AM
[PHP]var file_id="";
var file_type="";
var file_flag=0;
var file_id_del;
var start=0;
var limit=25;

var Cmb_store = new Ext.data.Store({
// HttpProxy should be used here
proxy: new Ext.data.HttpProxy({
url: 'php/file.php',
method:'POST'

}),
baseParams:
{task: 'show_file'
},
reader: new Ext.data.JsonReader({
root: 'results',
totalProperty: 'total',
id: 'file_id'
}, [
{name: 'file_id',type:'float', mapping: 'file_id'},
{name: 'file_name',type:'string', mapping: 'file_name'},
{name: 'file_type',type:'float', mapping: 'file_type'},
{name: 'description',type:'string', mapping: 'description'},
])

});
Cmb_store.load();

var Cmb_user_id_store = new Ext.data.Store({
// HttpProxy should be used here
proxy: new Ext.data.HttpProxy({
url: 'php/file.php',
method:'POST'

}),
baseParams:
{task: 'Show_cmb_user_id'
},
reader: new Ext.data.JsonReader({
root: 'results',
totalProperty: 'total',
id: 'user_id'
}, [
{name: 'user_id',type:'float', mapping: 'user_id'},
{name: 'full_name',type:'string', mapping: 'full_name'}
])

});
Cmb_user_id_store.load();

var Cmb_category_id_store = new Ext.data.Store({
// HttpProxy should be used here
proxy: new Ext.data.HttpProxy({
url: 'php/file.php',
method:'POST'

}),
baseParams:
{task: 'Show_cmb_category_id'
},
reader: new Ext.data.JsonReader({
root: 'results',
totalProperty: 'total',
id: 'category_id'
}, [
{name: 'category_id',type:'float', mapping: 'category_id'},
{name: 'category_title',type:'string', mapping: 'category_title'}
])

});
Cmb_category_id_store.load();

var file_store = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: 'php/file.php' ,
method: 'POST',
totalProperty:'total'
}),
baseParams:{
task: "search",
file_type:file_type,
file_id:file_id
},
//set up the JsonReader
reader: new Ext.data.JsonReader({
root: 'results',
id: 'file_id',
totalProperty:'total'
},[
{name: 'file_id', type: 'float',mapping:'file_id'},
{name: 'file_name', type: 'string',mapping:'file_name'},
{name: 'file_type', type: 'float',mapping:'file_type'},
{name: 'description', type: 'string',mapping:'description'},
{name: 'file_path', type: 'string',mapping:'file_path'},
{name: 'user_id', type: 'float',mapping:'user_id'},
{name: 'category_id', type: 'float',mapping:'category_id'},
{name: 'regist_date', type: 'date',dateFormat: 'Y-m-d H:i:s',mapping:'regist_date'},
{name: 'change_date', type: 'date',dateFormat: 'Y-m-d H:i:s',mapping:'change_date'}
])
});

var Cmb_file_id=new Ext.form.ComboBox({
xtype:'textfield',
fieldLabel: 'T

Condor
25 Jan 2008, 2:38 AM
Don't use el/renderTo/render/applyTo/applyToMarkup for components that should be inside a container.

Use:


container.add(component);
container.doLayout();

quockhanh82
25 Jan 2008, 3:51 AM
Thank you for reply ! I will try work.

quockhanh82
27 Jan 2008, 9:15 AM
Hi condor !

tab.add(file_search);
tab.add(file_grid);

result is same. Help me, condor or admin ! It's my first project with extjs for company. I am can't unsuccessful. Thank !

quockhanh82
27 Jan 2008, 6:20 PM
Admin,Help me !