rem: if (arguments[2]) { ele.options[ele.options.length] = new Option(prop, data[prop]); } else { ele.options[ele.options.length] = new Option(data[prop], prop); } 
add: if (arguments[2]) ele.options[ele.options.length] = new Option(prop, data[prop]); else ele.options[ele.options.length] = new Option(data[prop], prop); 
context: DWRUtil.addOptions = function(ele, data) {  ele = DWRUtil._getElementById(ele, "addOptions()");  if (ele == null) return;  var useOptions = DWRUtil._isHTMLElement(ele, "select");  var useLi = DWRUtil._isHTMLElement(ele, ["ul", "ol"]);  if (!useOptions && !useLi) {    DWRUtil.debug("addOptions() can only be used with select/ul/ol elements. Attempt to use: " + DWRUtil._detailedTypeOf(ele));    return;  }  if (data == null) return;  var text;  var value;  var li;  if (DWRUtil._isArray(data)) {    // Loop through the data that we do have    for (var i = 0; i < data.length; i++) {      if (useOptions) {        if (arguments[2] != null) {          if (arguments[3] != null) {            text = DWRUtil._getValueFrom(data[i], arguments[3]);            value = DWRUtil._getValueFrom(data[i], arguments[2]);          }          else {            value = DWRUtil._getValueFrom(data[i], arguments[2]);            text = value;          }        }        else        {          text = DWRUtil._getValueFrom(data[i], arguments[3]);          value = text;        }        if (text || value) {          ele.options[ele.options.length] = new Option(text, value);        }      }      else {        li = document.createElement("li");        value = DWRUtil._getValueFrom(data[i], arguments[2]);        if (value != null) {          li.innerHTML = value;          ele.appendChild(li);        }      }    }  }  else if (arguments[3] != null) {    if (!useOptions) {      alert("DWRUtil.addOptions can only create select lists from objects.");      return;    }    for (var prop in data) {      value = DWRUtil._getValueFrom(data[prop], arguments[2]);      text = DWRUtil._getValueFrom(data[prop], arguments[3]);      if (text || value) {        ele.options[ele.options.length] = new Option(text, value);      }    }  }  else {    if (!useOptions) {      DWRUtil.debug("DWRUtil.addOptions can only create select lists from objects.");      return;    }    for (var prop in data) {      if (typeof data[prop] != "function") {        if (arguments[2]) {          ele.options[ele.options.length] = new Option(prop, data[prop]);        }        else {          ele.options[ele.options.length] = new Option(data[prop], prop);        }      }    }  }};
meta: 266	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/266/5698e064fd7cfccfcf96b459e1b1024bad78f808/util.js/clean/java/org/directwebremoting/util.js