View Full Version : How to use the Itemselector widget?

7 Oct 2011, 3:42 AM

I try to use the itemselector in a form. I thought I just need to use it as an xtype but as it doesn't work, I maybe need to do something else.

Here is the view I've created:

Ext.define('AM.view.user.Form' ,{
extend: 'Ext.form.Panel',

requires: [ 'AM.view.release.Combo' ],

alias : 'widget.addmod',

title: 'New Mod',
height: 180,
width: 300,
bodyPadding: 5,
//url: 'app/store/getTablesList.cfm',
//mode: 'post',
//params: {posted: 'ok'},
defaultType: 'textfield',
standardSubmit: true,
items: [
fieldLabel: 'ClearQuest',
fieldLabel: 'Who',
name: 'Who'
xtype: 'releasecombo'
xtype: 'textareafield',
name: 'comments',
fieldLabel: 'Comments'
xtype: 'itemselector',
name: 'tables',
store: 'Tables',
fieldLabel: 'Select tables',
displayField: 'TAB_NAME',
valueField: 'TAB_NAME'
text: 'Submit',
handler: function() {
// The getForm() method returns the Ext.form.Basic instance:
var form = this.up('form').getForm();//,
//record = form.getRecord();
if (form.isValid()) {
// Submit the Ajax request and handle the response
success: function(form, action) {
Ext.Msg.alert('Success', action.result.msg);
failure: function(form, action) {
Ext.Msg.alert('Failed', action.result.msg);


Thanks in advance for any help.

7 Oct 2011, 9:22 AM
Are you getting an error message in the console?

Have you included all the JS files for the ItemSelector? It's a UX, it isn't included in the main library.