1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| var ds2 = new Ext.data.JsonStore({
url: "scripts/InfosOfSpecie.php?sp="+Ext.getCmp('ind2').getValue(),
fields:['scname', 'AphiaID', 'url'],
autoLoad: true
});
var testForm = new Ext.form.FormPanel({
width: 500,
store: ds2,
items: [{
xtype: 'fieldset',
title: 'Contact Information',
items: [{
xtype:'textfield',
fieldLabel: 'scname',
name: 'scname'
}, {
xtype:'textfield',
fieldLabel: 'AphiaID',
name: 'AphiaID'
}, {
xtype:'textfield',
fieldLabel: 'url',
name: 'url'
}]
}]
});
ds2.on("load", function(thisStore, records, options) {
var cnt = thisStore.getCount();
console.log(cnt);
testForm.render();
});
var win = new Ext.Window({
width: 300,
height: 150,
items: [testForm]
});
win.show(); |
Partager