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 42 43 44 45 46 47 48 49 50 51
|
var BaseReclamation;
var test;
var tmp;
Ext.require('Ext.data.Store');
Ext.define('Reclamation', {
extend: 'Ext.data.Model',
fields: [
{name: 'CONTINUE_ID', type: 'int'},
{name: 'TYPE', type:'string'}
]
});
Ext.onReady(function() {
Ext.QuickTips.init();
// création du textArea
text = Ext.create('Ext.form.field.TextArea',{
renderTo: Ext.getDom('test'),
name: 'objet_detail_contact',
id: 'objet_detail_contact',
autoScroll: 'auto',
width: 400,
height: 100,
anchor: '100%',
readOnly: true
});
//Création du dataStore
BaseReclamation = Ext.create('Ext.data.Store',{
model: Reclamation,
pageSize:10,
proxy: {
type: 'ajax',
url: 'http://128.128.76.2/dev/qualite/qualite/ameliorationjson.php',
reader: {
type: 'json',
root: 'data',
successProperty: 'success'
}
},
listeners: {
load: {fn: function(){
text.setValue(BaseReclamation.getAt(0).get('CONTINUE_ID'));
}}
}
});
// Application d'un filtre et chargement
BaseReclamation.filter('ID',document.getElementById("reclam_id").value)
BaseReclamation.load();
}); |
Partager