How to insert manual values within Select tag in ENYO

edited May 2013 in Enyo 2
Hi Team,


I want to insert two manual records in the tag. Right now the data is fetched dyanamically. This is the class which contains the tag declaration.
enyo.kind({
	name : 'OB.UI.SearchSplitTypesHeader',
	kind : 'OB.UI.ScrollableTableHeader',
	events : {
	},
	handlers : {
	},
	components : [ {
		style : 'padding: 10px 10px 5px 10px;',
		components : [ {
			style : 'margin: 5px 0px 0px 0px;',
			components : [ {
				kind : 'OB.UI.List',
				name : 'productcategory',
				classes : 'combo',
				style : 'width: 100%',
				renderHeader : enyo.kind({
					kind : 'enyo.Option',
					initComponents : function() {
						this.inherited(arguments);
						this.setContent('By Food & Alcohol');
					}
				}),
				renderLine : enyo.kind({
					kind : 'enyo.Option',
					initComponents : function() {
						this.inherited(arguments);
						this.setValue('By Item');
			            this.setContent('By Food & Alcohol');
			            this.setContent('By Item');
					}
				}),
				renderEmpty : 'enyo.Control'
			} ]
		} ]
	} ],
	setHeaderCollection : function(valueToSet) {
		console.log("in setHeader collection");
		console.log(valueToSet.toString());
		this.$.productcategory.setCollection(valueToSet);
	},
});


And the Data is set using the setHeaderCollection() function, which is called in init() method.

Comments

Sign In or Register to comment.