PDA

View Full Version : Item selector does not appear



sliks
9 Dec 2011, 2:01 PM
I am still new to ExtJs. So this is probably a very simple question. I was trying to use the itemselector, so i copied some of the codes in the example, but the selector does not appear.

Here is my code. Any ideas?


Ext.define('Ext.property.widgets.CustomReport', {
requires: [
'Ext.ux.form.ItemSelector',
'Ext.ux.form.MultiSelect'
],
extend: 'Ext.form.Panel',
title: 'Custom Report',
id: 'customReport',
layout: 'column',
bodyStyle: 'padding: 10px;',
initComponent: function () {
var ds = Ext.create('Ext.data.ArrayStore', {
data: [[123,'One Hundred Twenty Three'],
['1', 'One'], ['2', 'Two'], ['3', 'Three'], ['4', 'Four'], ['5', 'Five'],
['6', 'Six'], ['7', 'Seven'], ['8', 'Eight'], ['9', 'Nine']],
fields: ['value','text'],
sortInfo: {
field: 'value',
direction: 'ASC'
}
});
this.items = [
{
xtype: 'itemselector',
name: 'itemselector',
//anchor: '100%',
fieldLabel: 'Item Selector',
store: ds,
displayField: 'text',
valueField: 'value',
value: ['3', '4', '6'],
autoRender: true,
allowBlank: false,
// minSelections: 2,
// maxSelections: 3,
msgTarget: 'side'
}
];
this.callParent();
},
});

sliks
9 Dec 2011, 2:14 PM
i figured it out. I need width and height.


width: 500,
height: 500,