rem: var text; if(this.options.loadTextURL) { text = this.options.loadingText; } else { text = this.getText(); }  var obj = this;  if (this.options.rows == 1 && !this.hasHTMLLineBreaks(text)) { this.options.textarea = false; var textField = document.createElement("input"); textField.obj = this; textField.type = "text"; textField.name = this.options.paramName; textField.value = text; textField.style.backgroundColor = this.options.highlightcolor; textField.className = 'editor_field'; var size = this.options.size || this.options.cols || 0; if (size != 0) textField.size = size; if (this.options.submitOnBlur) textField.onblur = this.onSubmit.bind(this); this.editField = textField; } else { this.options.textarea = true; var textArea = document.createElement("textarea"); textArea.obj = this; textArea.name = this.options.paramName; textArea.value = this.convertHTMLLineBreaks(text); textArea.rows = this.options.rows; textArea.cols = this.options.cols || 40; textArea.className = 'editor_field'; if (this.options.submitOnBlur) textArea.onblur = this.onSubmit.bind(this); this.editField = textArea; }  if(this.options.loadTextURL) { this.loadExternalText(); } this.form.appendChild(this.editField); 
add: var list = document.createElement('select'); list.name = this.options.paramName; list.size = 1; this._controls.editor = list; this._collection = this.options.collection || []; if (this.options.loadCollectionURL) this.loadCollection(); else this.checkForExternalText(); this._form.appendChild(this._controls.editor); 
context:   createEditField: function() {    var text;    if(this.options.loadTextURL) {      text = this.options.loadingText;    } else {      text = this.getText();    }    var obj = this;        if (this.options.rows == 1 && !this.hasHTMLLineBreaks(text)) {      this.options.textarea = false;      var textField = document.createElement("input");      textField.obj = this;      textField.type = "text";      textField.name = this.options.paramName;      textField.value = text;      textField.style.backgroundColor = this.options.highlightcolor;      textField.className = 'editor_field';      var size = this.options.size || this.options.cols || 0;      if (size != 0) textField.size = size;      if (this.options.submitOnBlur)        textField.onblur = this.onSubmit.bind(this);      this.editField = textField;    } else {      this.options.textarea = true;      var textArea = document.createElement("textarea");      textArea.obj = this;      textArea.name = this.options.paramName;      textArea.value = this.convertHTMLLineBreaks(text);      textArea.rows = this.options.rows;      textArea.cols = this.options.cols || 40;      textArea.className = 'editor_field';            if (this.options.submitOnBlur)        textArea.onblur = this.onSubmit.bind(this);      this.editField = textArea;    }        if(this.options.loadTextURL) {      this.loadExternalText();    }    this.form.appendChild(this.editField);  },
meta: 8434	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8434/6873fc8026e87544ee93e0d9551ae57083313cff/controls.js/buggy/vendor/rails/actionpack/lib/action_view/helpers/javascripts/controls.js