rem: selectedPriority = selectedPriority[0]; 
context: function initializeDialog(filter){    gFilterNameElement.value = filter.filterName;    var actionList = filter.actionList;    var numActions = actionList.Count();        for (var actionIndex=0; actionIndex < numActions; actionIndex++)    {      var filterAction = actionList.QueryElementAt(actionIndex, Components.interfaces.nsIMsgRuleAction);      if (filterAction.type == nsMsgFilterAction.MoveToFolder) {        // preselect target folder        gMoveToFolderCheckbox.checked = true;        var target = filterAction.targetFolderUri;        if (target)           SetFolderPicker(target, gActionTargetElement.id);      }      else if (filterAction.type == nsMsgFilterAction.ChangePriority)       {        gChangePriorityCheckbox.checked = true;        // initialize priority        var selectedPriority = gActionPriority.getElementsByAttribute("value", filterAction.priority);        if (selectedPriority && selectedPriority.length > 0)         {          selectedPriority = selectedPriority[0];          gActionPriority.selectedItem = selectedPriority;        }      }      else if (filterAction.type == nsMsgFilterAction.Label)       {        gLabelCheckbox.checked = true;        // initialize label        var selectedLabel = gActionLabel.getElementsByAttribute("value", filterAction.label);        if (selectedLabel && selectedLabel.length > 0)         {          selectedLabel = selectedLabel[0];          gActionLabel.selectedItem = selectedLabel;        }      }      else if (filterAction.type == nsMsgFilterAction.JunkScore)       {        gChangeJunkScoreCheckbox.checked = true;        // initialize junk score        var selectedJunkScore = gActionJunkScore.getElementsByAttribute("value", filterAction.junkScore);        if (selectedJunkScore && selectedJunkScore.length > 0)         {          selectedJunkScore = selectedJunkScore[0];          gActionJunkScore.selectedItem = selectedJunkScore;        }      }      else if (filterAction.type == nsMsgFilterAction.MarkRead)        gMarkReadCheckbox.checked = true;      else if (filterAction.type == nsMsgFilterAction.MarkFlagged)        gMarkFlaggedCheckbox.checked = true;      else if (filterAction.type == nsMsgFilterAction.Delete)        gDeleteCheckbox.checked = true;      else if (filterAction.type == nsMsgFilterAction.WatchThread)        gWatchCheckbox.checked = true;      else if (filterAction.type == nsMsgFilterAction.KillThread)        gKillCheckbox.checked = true;      else if (filterAction.type == nsMsgFilterAction.DeleteFromPop3Server)        gDeleteFromServerCheckbox.checked = true;      SetUpFilterActionList(getScope(filter));    }    var scope = getScope(filter);    setSearchScope(scope);    initializeSearchRows(scope, filter.searchTerms);    if (filter.searchTerms.Count() > 1)      gSearchLessButton.removeAttribute("disabled", "false");}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/846feff6655c64b6730d27fc562b2473668519f4/FilterEditor.js/clean/mailnews/base/search/resources/content/FilterEditor.js