rem: factorDS.on( "load", function() { factorGrid.getView().autoSizeColumns(); } ); 
add: Ext.onReady(function() {  eeID = dwr.util.getValue("expressionExperimentID"); edID = dwr.util.getValue("experimentalDesignID"); var admin = dwr.util.getValue("experimentalDesignAdmin");       if (Ext.get("eDesign")){     expFactorLabel = new Ext.form.TextField({readOnly: true, allowBlank : false, invalidText : "Selected Factor", blankText : "Selected Factor", emptyText : "Selected Factor", width: 200}); factorValueLabel = new Ext.form.TextField({readOnly: true, allowBlank : false, invalidText : "Select a factor value", blankText : "Selected Factor Value", emptyText : "Factor Value", width: 200});   var simpleTB = new Ext.Toolbar({renderTo: "eDesign"}); simpleTB.addText("Displaying BioMaterials for: "); simpleTB.addField(expFactorLabel); simpleTB.addSpacer(); simpleTB.addSpacer(); simpleTB.addText("Factor Value to assign: "); simpleTB.addField(factorValueLabel); simpleTB.addSpacer(); assignFactorValueToBioMaterialButton = simpleTB.addButton({text: 'assign', tooltip: 'assigns the selected Factor Value to the selected BioMaterials', handler: saveFactorValueToBMHandler, disabled: true });  initBioMaterialGrid("bmGrid"); }     initFactorGrid("factorGrid"); if (Ext.get("factorGridTB")){   factorMgedComboBox = createMgedComboBox(function(field,record,index){saveNewFactorButton.enable();}); var factorTB = new Ext.Toolbar({renderTo: "factorGridTB"}); factorTB.addField(factorMgedComboBox); factorTB.addSpacer(); factorTB.addField(createFactorDescriptionField()); factorTB.addSpacer(); saveNewFactorButton = factorTB.addButton({text: 'save', tooltip: 'creates a new Experimental Factor', handler: saveExperimentalFactor, disabled: true }); factorTB.addSeparator(); removeFactorButton = factorTB.addButton({text: 'delete', tooltip: 'removes the selected Experimental Factor', handler: deleteExperimentalFactor, disabled: true });  }      initFactorValueGrid("factorValueGrid");  if ( admin ) { var factorValueTB = new Ext.Gemma.AnnotationToolBar( factorValueGrid, { createHandler : saveExperimentalFactorValue, deleteHandler : deleteExperimentalFactorValue, addDescription : true, mgedComboWidth: 125, charComboWidth: 100 } ); }  }); 
context:      factorDS.on( "load", function() {       	factorGrid.getView().autoSizeColumns();     } );
meta: 2891	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/2891/d109eea1e59fbb030ac98e95f181f72da9611a48/ExperimentalDesign.js/buggy/gemma-web/src/main/webapp/scripts/ajax/ExperimentalDesign.js