rem: ontologySearchVocabC.value = q; 
context: var createOntologySearchComponent = function(){			 var searchHandler = function(record, index){        	        	             if(this.fireEvent('beforeselect', this, record, index) !== false){        	    this.setValue(record.data.value);            	this.collapse();            	this.fireEvent('select', this, record, index);											ontologySearchVocabC.valueUri = record.data.valueUri;				ontologySearchVocabC.value = record.data.value;				saveNewFactorValueButton.enable();            }           	    	                	        }            var getStyle = function(record) {    	if ( record.description.substring(0, 8) == " -USED- ")    		return record.valueUri ? "usedWithUri" : "usedNoUri";    	else    		return record.valueUri ? "unusedWithUri" : "unusedNoUri";    }        var getDescription = function(record) {    	if ( record.valueUri )    		return record.valueUri;    	else    		return ( record.description.substring(0, 8) == " -USED- " ) ?    			record.description.substring(8) : record.description;    }            	var     recordType = Ext.data.Record.create([					   {name:"id", type:"int"},                       {name:"value", type:"string"},                       {name:"valueUri", type:"string"},                       {name:"categoryUri",type:"string"},                       {name:"category", type:"string"},                       {name:"description", mapping:"this", convert:getDescription},                       {name:"style", mapping:"this", convert:getStyle}               ]);       ds = new Ext.data.Store(               {                       proxy:new Ext.data.DWRProxy(OntologyService.findExactTerm),                       reader:new Ext.data.ListRangeReader({id:"id"}, recordType),                       remoteSort:false                                    });       var cm = new Ext.grid.ColumnModel([                       {header: "term", width: 50, dataIndex:"value"},                       {header: "uri",  width: 80, dataIndex:"valueUri"}                                              ]);       cm.defaultSortable = true;	         // Custom rendering Template    var resultTpl = new Ext.Template(        '<div class="search-item">',            '<div class="{style}" title="{description}">{value}</div>',        '</div>'    );        var search = new Ext.form.ComboBox({    	        store: ds,        displayField:'title',        fieldLabel: 'Lookup',        typeAhead: false,        loadingText: 'Searching...',             pageSize:0,        minChars: 2,        tpl: resultTpl,        hideTrigger:true,            onSelect: searchHandler,          getParams: function (q) {	//Need to overide this so that the query data makes it to the client side. Otherwise its not included.     		var p = [q];     		    		ontologySearchVocabC.value = q;	//if the user doesn't select a provided ontolgy term this will set it to be the free text.     		if (!ontologySearchVocabC.categoryUri)    			ontologySearchVocabC.categoryUri="{}";    			   		 	p.push(ontologySearchVocabC.categoryUri);   		 		   		 	return p;		}            });		return search;	}
meta: 2891	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/2891/7c0b06e8eac99829bf894e93c9d6de5181f015e4/ExperimentalDesign.js/buggy/gemma-web/src/main/webapp/scripts/ajax/ExperimentalDesign.js