Models.PossibleValue = Models.Base.extend({ classType: "MODELS.POSSIBLEVALUE", defaults: { // id: "", value: "", label: "", selected: false, index: -1 }, initialize: function() { if (!this.get("label")) { this.set("label", this.get("value")); } else { this.set("label", decodeURIComponent(this.get("label")).replace( new RegExp( "\\+", "g" ), " " )); } }, clear: function() { this.set("value", ""); this.set("label", ""); this.set("selected", false); this.set("index", -1); } }); Models.PossibleValueCollection = Models.BaseCollection.extend({ model: Models.PossibleValue, initFromObjectArray: function(objArr) { for(var i=0;i