context: DWRUtil.addOptions = function(ele, data) {  var orig = ele;  ele = $(ele);  if (ele == null) {    DWRUtil.debug("addOptions() can't find an element with id: " + orig + ".");    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 elements. Attempt to use: " + DWRUtil._detailedTypeOf(ele));    return;  }  if (data == null) return;  var text;  var value;  var opt;  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) {          opt = new Option(text, value);          ele.options[ele.options.length] = opt;        }      }      else {        li = document.createElement("li");        value = DWRUtil._getValueFrom(data[i], arguments[2]);        if (value != null) {          li.innerHTML = value;          ele.appendChild(li);        }      }    }  }  else  {    for (var prop in data) {      if (!useOptions) {        DWRUtil.debug("DWRUtil.addOptions can only create select lists from objects.");        return;      }      if (arguments[2]) {        text = prop;        value = data[prop];      }      else {        text = data[prop];        value = prop;      }      if (text || value) {        opt = new Option(text, value);        ele.options[ele.options.length] = opt;      }    }  }};
meta: 266	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/266/6a0ca38aeb11ee4d0a2f8acdaaec1dd5d710425e/util.js/clean/java/uk/ltd/getahead/dwr/util.js