marxan
28 Mar 2011, 12:37 AM
Hello,
I try to use the multiselect extension but I get the error message this.multiselects is null.
Here is my code:
Ext.onReady(function() {
var ds = new Ext.data.Store({
totalProperty: 'DATASET',
root: 'ROWS',
url: '../components/JSONPreferences.cfc',
baseParams:
{
method: 'GetReferences',
returnFormat: 'JSON',
}
});
ds.load();
var formItemSelector = new Ext.FormPanel();
var itemSelector = new Ext.ux.ItemSelector({
name : 'itemselector',
fieldLabel : 'ItemSelector',
dataFields : ['Project', 'Reference'],
imagePath: '#Variables.ExtjsPath#examples/ux/images/',
fromStore: ds,
valueField: 'Project',
displayField: 'Reference',
msWidth: 200,
msHeight: 200
});
formItemSelector.add(itemSelector);
formItemSelector.render('form-ct-itemselector');
});
And this is the format of my Json:
{"DATASET":191,"ROWS":[{"Project":221889.0,"Reference":221889.0}]}
If anyone could help. I've already spent a couple of days on that and I still have found what to do to make this thing working.
Thanks in advance.
Marxan
I try to use the multiselect extension but I get the error message this.multiselects is null.
Here is my code:
Ext.onReady(function() {
var ds = new Ext.data.Store({
totalProperty: 'DATASET',
root: 'ROWS',
url: '../components/JSONPreferences.cfc',
baseParams:
{
method: 'GetReferences',
returnFormat: 'JSON',
}
});
ds.load();
var formItemSelector = new Ext.FormPanel();
var itemSelector = new Ext.ux.ItemSelector({
name : 'itemselector',
fieldLabel : 'ItemSelector',
dataFields : ['Project', 'Reference'],
imagePath: '#Variables.ExtjsPath#examples/ux/images/',
fromStore: ds,
valueField: 'Project',
displayField: 'Reference',
msWidth: 200,
msHeight: 200
});
formItemSelector.add(itemSelector);
formItemSelector.render('form-ct-itemselector');
});
And this is the format of my Json:
{"DATASET":191,"ROWS":[{"Project":221889.0,"Reference":221889.0}]}
If anyone could help. I've already spent a couple of days on that and I still have found what to do to make this thing working.
Thanks in advance.
Marxan