DayOfWeekCombo = {
	convertToString: function(value) {
		switch(value) {
			case 1: return 'Sunday';
			case 2: return 'Monday';
			case 3: return 'Tuesday';
			case 4: return 'Wednesday';
			case 5: return 'Thursday';
			case 6: return 'Friday';
			case 7: return 'Saturday';
		}
		return;
	}
}

Ext.define('App.view.DayOfWeekCombo',{
	extend:'Ext.form.field.ComboBox',
	alias:'widget.dayOfWeekCombo',

	fieldLabel:'Day Of Week',
	name:'dayOfWeek',
	displayField: 'name',
	valueField: 'value',
	editable: true,
	tpl: '<tpl for="."><div class="x-boundlist-item">{name}</div></tpl>',

	initComponent: function() {
		var me = this;

		if (!me.store) me.store = Ext.create('Ext.data.Store', {
			fields: ['value','name'],
			data: [
				{
					value: 1,
					name: 'Sunday',
				},				
				{
					value: 2,
					name: 'Monday',
				},
				{
					value: 3,
					name: 'Tuesday',
				},
				{
					value: 4,
					name: 'Wednesday',
				},
				{
					value: 5,
					name: 'Thursday',
				},
				{
					value: 6,
					name: 'Friday',
				},
				{
					value: 7,
					name: 'Saturday',
				},
			]
		});

		me.callParent();

	}
});
