AdfRichUIPeer.createPeerClass(AdfDhtmlSelectManyPeer, "AdfDhtmlSelectManyChoicePeer");
AdfDhtmlSelectManyChoicePeer.InitSubclass = function() {
  AdfRichUIPeer.addComponentPropertyGetters(this, AdfUIEditableValue.SUBMITTED_VALUE, AdfUISelectMany.SELECT_ITEMS, AdfRichSelectManyChoice.LABEL);
  AdfRichUIPeer.addComponentPropertyChanges(this, AdfRichSelectManyChoice.LABEL);
  AdfRichUIPeer.addComponentEventHandlers(this, AdfUIInputEvent.CLICK_EVENT_TYPE, AdfUIInputEvent.MOUSE_DOWN_EVENT_TYPE, AdfUIInputEvent.MOUSE_UP_EVENT_TYPE, AdfUIInputEvent.KEY_DOWN_EVENT_TYPE, AdfUIInputEvent.KEY_PRESS_EVENT_TYPE);
  if (AdfAgent.AGENT.getPlatform() == AdfAgent.IE_PLATFORM) {
    AdfRichUIPeer.addComponentEventHandlers(this, AdfUIInputEvent.FOCUS_EVENT_TYPE, AdfUIInputEvent.BLUR_EVENT_TYPE);
  }
  this._DROPDOWN_ID = "drop";
  this._POPUP_ID = "pop";
  this._POPUP_WRAPPER_ID = "popWrap";
  this._SPACER_ID = "sp";
  this._LAZY_ID = "lazy";
  this._POPUP_PANEL_ID = "_afrSelectManyPopupPanel";
  this._ITEM_VALUE_EXPANDO = "_afrItemValue";
  this._ITEM_DISABLE_EXPANDO = "_afrDisable";
  this._SELECTED_ID_EXPANDO = "_afrSelectedItemId";
  this._TRUE_VALUE_ATTR = "_adfTrueVal";
  this._HIGHLIGHTED_STYLE = "p_AFHighlighted";
  this._SELECTED_STYLE_CLASS = "p_AFSelected";
  this._DISABLED = "disabled";
  this._FETCHING_POPUP_WRAPPER_ID = "fetchWrap";
  this._FETCHING_POPUP_ID = "fetchPop";
  this._FETCHING_SPACER_ID = "fetchSp";
  this._FETCHING_POPUP_PANEL_ID = "_afrSelectManyFetchingPopupPanel";
  this._LAZY_STATE_CONTENT_LOADED = "contentLoaded";
  this._LAZY_STATE_NO_CONTENT = "noContent";
  this._LAZY_STATE_FETCHING = "fetching";
};
AdfDhtmlSelectManyChoicePeer.prototype.needsFocusTargetStyleClass = function() {
  return true;
};
AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentMouseDown = function(componentEvent) {
  var component = componentEvent.getSource();
  var domElement = this.getDomElement();
  var eventTarget = componentEvent.getNativeEventTarget();
  var contentNode = AdfDhtmlEditableValuePeer.getContentNode(component, domElement);
  var isImageTarget = eventTarget == this._getDropDownImgElement(component);
  var dropDownNode = this._getDropDownImgElement(component);
  if (!contentNode.disabled && (isImageTarget || eventTarget == contentNode)) {
    dropDownNode.parentNode.parentNode.setAttribute("aria-expanded", "true");
    if (this.isPopupVisible(component, AdfDhtmlSelectManyChoicePeer._FETCHING_POPUP_PANEL_ID)) {
      this.hidePopup(component, AdfDhtmlSelectManyChoicePeer._FETCHING_POPUP_PANEL_ID);
    } else {
      if (!this.isPopupVisible(component, AdfDhtmlSelectManyChoicePeer._POPUP_PANEL_ID)) {
        var lazyState = this._getLazyState();
        if (lazyState == AdfDhtmlSelectManyChoicePeer._LAZY_STATE_NO_CONTENT) {
          this._setLazyState(AdfDhtmlSelectManyChoicePeer._LAZY_STATE_FETCHING);
          (new AdfContentFetchEvent(component, AdfContentFetchEvent.FETCH_EVENT_TYPE)).queue();
          this._showFetchingDataPopup(component);
          return;
        } else {
          if (lazyState == AdfDhtmlSelectManyChoicePeer._LAZY_STATE_FETCHING) {
            return;
          } else {
            this._showPopupPanel(component);
          }
        }
      } else {
        this.hidePopup(component, AdfDhtmlSelectManyChoicePeer._POPUP_PANEL_ID);
        dropDownNode.parentNode.parentNode.setAttribute("aria-expanded", "false");
        this.HideNoteWindow(component);
      }
    }
  }
};
AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentMouseUp = function(componentEvent) {
  var component = componentEvent.getSource();
  var domElement = this.getDomElement();
  var eventTarget = componentEvent.getNativeEventTarget();
  var contentNode = AdfDhtmlEditableValuePeer.getContentNode(component, domElement);
  var isImageTarget = eventTarget == this._getDropDownImgElement(component);
  if (!contentNode.disabled && isImageTarget) {
    if (!this.isPopupVisible(component, AdfDhtmlSelectManyChoicePeer._POPUP_PANEL_ID)) {
      if (isImageTarget) {
        contentNode.focus();
      }
    }
  }
};
AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentFocus = function(componentEvent) {
  AdfDhtmlSelectManyChoicePeer.superclass.HandleComponentFocus.call(this, componentEvent);
  var component = componentEvent.getSource();
  var domElement = this.getDomElement();
  var contentNode = AdfDhtmlEditableValuePeer.getContentNode(component, domElement);
  AdfDomUtils.addCSSClassName(contentNode, AdfDhtmlSelectManyChoicePeer._SELECTED_STYLE_CLASS);
};
AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentBlur = function(componentEvent) {
  var component = componentEvent.getSource();
  var domElement = this.getDomElement();
  var contentNode = AdfDhtmlEditableValuePeer.getContentNode(component, domElement);
  AdfDomUtils.removeCSSClassName(contentNode, AdfDhtmlSelectManyChoicePeer._SELECTED_STYLE_CLASS);
};
AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentClick = function(componentEvent) {
  AdfDhtmlSelectManyChoicePeer.superclass.HandleComponentClick.call(this, componentEvent);
  var component = this.getComponent();
  var domElement = this.getDomElement();
  var contentNode = AdfDhtmlEditableValuePeer.getContentNode(component, domElement);
  if (!contentNode.disabled) {
    var checkbox = componentEvent.getNativeEventTarget();
    if (AdfAgent.AGENT.getNodeName(checkbox) != "INPUT") {
      checkbox = AdfDomUtils.getFirstChildElement(checkbox);
      if (checkbox) {
        checkbox = AdfDomUtils.getFirstChildElement(checkbox);
      }
      if (checkbox && AdfAgent.AGENT.getNodeName(checkbox) == "INPUT" && checkbox.type == "checkbox") {
        if (!checkbox.disabled) {
          checkbox.focus();
          checkbox.click();
        }
      } else {
        return;
      }
    }
    if (checkbox.type != "checkbox") {
      return;
    }
    var isAllBox = checkbox.getAttribute("id");
    var oldCheckbox = this._getCurrentItem(component, domElement);
    if (checkbox != oldCheckbox) {
      this._highlightNewItem(checkbox, oldCheckbox);
      if (!isAllBox) {
        var evt = componentEvent.getNativeEvent();
        if (evt.shiftKey) {
          this.SelectRange(component, domElement, checkbox, oldCheckbox);
        }
      }
    }
    if (isAllBox) {
      domElement = this.getDomElement();
      this.UpdateAll(component, domElement, checkbox.checked);
    }
    var value = this.GetSubmittedValue(component, checkbox);
    this.SetDisplayValue(component, contentNode, value);
  }
};
AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentKeyPress = function(componentEvent) {
  this.StopArrowKeyBubbling(componentEvent);
};
AdfDhtmlSelectManyChoicePeer.prototype.HandleComponentKeyDown = function(componentEvent) {
  this.StopArrowKeyBubbling(componentEvent);
  var eventTarget = componentEvent.getNativeEventTarget();
  if (eventTarget.tagName == "INPUT") {
    var evt = componentEvent.getNativeEvent();
    var keyCode = AdfAgent.AGENT.getKeyCode(evt);
    var component = componentEvent.getSource();
    if (keyCode == AdfKeyStroke.ESC_KEY) {
      if (this.isPopupVisible(component, AdfDhtmlSelectManyChoicePeer._POPUP_PANEL_ID)) {
        this.hidePopup(component, AdfDhtmlSelectManyChoicePeer._POPUP_PANEL_ID);
      } else {
        if (this.isPopupVisible(component, AdfDhtmlSelectManyChoicePeer._FETCHING_POPUP_PANEL_ID)) {
          this.hidePopup(component, AdfDhtmlSelectManyChoicePeer._FETCHING_POPUP_PANEL_ID);
        }
      }
    } else {
      if (eventTarget.type == "text") {
        if (keyCode == AdfKeyStroke.ARROWDOWN_KEY || keyCode == AdfKeyStroke.ARROWDOWN_KEY && evt.altKey) {
          this.HandleComponentMouseDown(componentEvent);
        }
      } else {
        if (eventTarget.type == "checkbox") {
          var domElement = this.getDomElement();
          var value;
          switch(keyCode) {
            case AdfKeyStroke.ENTER_KEY:
              var checkbox = this._getCurrentItem(component, domElement);
              if (checkbox) {
                value = this.GetSubmittedValue(component, checkbox);
                this.SetDisplayValue(component, AdfDhtmlEditableValuePeer.getContentNode(component, domElement), value);
              }
              this.hidePopup(component, AdfDhtmlSelectManyChoicePeer._FETCHING_POPUP_PANEL_ID);
              this.hidePopup(component, AdfDhtmlSelectManyChoicePeer._POPUP_PANEL_ID);
              break;
            case AdfKeyStroke.TAB_KEY:
              this.hidePopup(component, AdfDhtmlSelectManyChoicePeer._FETCHING_POPUP_PANEL_ID);
              this.hidePopup(component, AdfDhtmlSelectManyChoicePeer._POPUP_PANEL_ID);
              this.HideNoteWindow(component);
              var contentNode = AdfDhtmlEditableValuePeer.getContentNode(component, domElement);
              if (evt.shiftKey) {
                AdfFocusUtils.focusPreviousTabStop(contentNode);
              } else {
                AdfFocusUtils.focusNextTabStop(contentNode);
              }
              componentEvent.cancel();
              break;
            case AdfKeyStroke.A_KEY:
              if (evt.ctrlKey) {
                this.UpdateAll(component, domElement, true);
                value = this.GetSubmittedValue(component, domElement);
                this.SetDisplayValue(component, AdfDhtmlEditableValuePeer.getContentNode(component, domElement), value);
                componentEvent.cancel();
              }
              break;
            case AdfKeyStroke.ARROWUP_KEY:
            ;
            case AdfKeyStroke.ARROWDOWN_KEY:
              var oldItem = this._getCurrentItem(component, domElement);
              var newItem;
              if (keyCode == AdfKeyStroke.ARROWUP_KEY) {
                newItem = this.GetPreviousItem(component, domElement, oldItem, evt.shiftKey);
              } else {
                newItem = this.GetNextItem(component, domElement, oldItem);
              }
              if (newItem && newItem != oldItem) {
                this._highlightNewItem(newItem, oldItem);
                if (evt.shiftKey) {
                  oldItem.checked = true;
                  newItem.checked = true;
                  value = this.GetSubmittedValue(component, newItem);
                  this.SetDisplayValue(component, AdfDhtmlEditableValuePeer.getContentNode(component, domElement), value);
                }
                newItem.focus();
              }
              componentEvent.cancel();
              break;
            case AdfKeyStroke.HOME_KEY:
            ;
            case AdfKeyStroke.END_KEY:
              if (evt.shiftKey) {
                var curItem = this._getCurrentItem(component, domElement);
                var endItem;
                if (keyCode == AdfKeyStroke.HOME_KEY) {
                  endItem = this.GetNextItem(component, domElement, null);
                } else {
                  endItem = this.GetPreviousItem(component, domElement, null, true);
                }
                this.SelectRange(component, domElement, curItem, endItem);
                value = this.GetSubmittedValue(component, endItem);
                this.SetDisplayValue(component, AdfDhtmlEditableValuePeer.getContentNode(component, domElement), value);
                this._highlightNewItem(endItem, curItem);
                endItem.focus();
              }
              break;
          }
        }
      }
    }
  }
};
AdfDhtmlSelectManyChoicePeer.prototype.ReplaceDomElement = function(newElement, oldElement) {
  AdfDhtmlSelectManyChoicePeer.superclass.ReplaceDomElement.call(this, newElement, oldElement);
  if (this._getLazyState() != AdfDhtmlSelectManyChoicePeer._LAZY_STATE_FETCHING) {
    return;
  }
  var component = this.getComponent();
  var contentNode = AdfDhtmlEditableValuePeer.getContentNode(component, newElement);
  var boxes = this.GetCheckboxes(component, contentNode);
  if (boxes) {
    for (var i = 0;i < boxes.length;i++) {
      this.UpdateSelectedStyle(boxes[i]);
    }
    var selectAllCheckbox = this.GetSelectAllCheckbox(component);
    if (selectAllCheckbox != null) {
      this.UpdateSelectedStyle(selectAllCheckbox);
    }
  }
  this._setLazyState(AdfDhtmlSelectManyChoicePeer._LAZY_STATE_CONTENT_LOADED);
  this.hidePopup(component, AdfDhtmlSelectManyChoicePeer._FETCHING_POPUP_PANEL_ID);
  this._showPopupPanel(component);
};
AdfDhtmlSelectManyChoicePeer.prototype.GetSelectItemsParentDomElement = function(component) {
  var popupContentId = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlSelectManyChoicePeer._POPUP_ID);
  return AdfAgent.AGENT.getElementById(popupContentId);
};
AdfDhtmlSelectManyChoicePeer.prototype.SetDisplayValue = function(component, domElement, newValue) {
  AdfAssert.assertDomElement(domElement);
  AdfAssert.assertArray(newValue);
  this._needsDisplayUpdate = false;
  var boxes = this.GetCheckboxes(component, domElement);
  if (boxes) {
    var selectAll = true;
    var checkedValues = null;
    var checkedValuesCnt = 0;
    for (var i = 0;i < boxes.length;i++) {
      var cb = boxes[i];
      var index = AdfCollections.indexOf(newValue, cb.value);
      cb.checked = index >= 0;
      this.UpdateSelectedStyle(cb);
      if (cb.checked) {
        var trueValue = cb.getAttribute(AdfDhtmlSelectManyChoicePeer._TRUE_VALUE_ATTR);
        checkedValuesCnt++;
        if (checkedValues == null) {
          checkedValues = trueValue;
        } else {
          checkedValues += "; " + trueValue;
        }
      } else {
        if (!cb.disabled) {
          selectAll = false;
        }
      }
    }
    var selectAllCheckbox = this.GetSelectAllCheckbox(component);
    if (selectAllCheckbox != null) {
      if (selectAllCheckbox.checked != selectAll) {
        selectAllCheckbox.checked = selectAll;
      }
      this.UpdateSelectedStyle(selectAllCheckbox);
    }
    if (selectAll && checkedValuesCnt > 1) {
      var laf = AdfPage.PAGE.getLookAndFeel();
      checkedValues = laf.getTranslatedString("af_selectManyChoice.LABEL_TIP_SELECT_ALL");
    }
    var content = AdfDhtmlEditableValuePeer.getContentNode(component, domElement);
    if (checkedValues === null) {
      checkedValues = "";
    }
    content.value = checkedValues;
    content.title = checkedValues;
  }
};
AdfDhtmlSelectManyChoicePeer.prototype.GetSubmittedValue = function(component, domElement) {
  var lazyState = this._getLazyState();
  if (lazyState != AdfDhtmlSelectManyChoicePeer._LAZY_STATE_CONTENT_LOADED) {
    AdfAssert.assertDomElement(domElement);
    var laf = AdfPage.PAGE.getLookAndFeel();
    var all = laf.getTranslatedString("af_selectManyChoice.LABEL_TIP_SELECT_ALL");
    var content = AdfDhtmlEditableValuePeer.getContentNode(component, domElement);
    if (content.value == all) {
      return null;
    }
  }
  return AdfDhtmlSelectManyChoicePeer.superclass.GetSubmittedValue(component, domElement);
};
AdfDhtmlSelectManyChoicePeer.prototype.PopupClosed = function(component, contentDom, popupId) {
  if (popupId == AdfDhtmlSelectManyChoicePeer._POPUP_PANEL_ID) {
    var popupWrapperId = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlSelectManyChoicePeer._POPUP_WRAPPER_ID);
    var parentDom = AdfAgent.AGENT.getElementById(popupWrapperId);
    parentDom.appendChild(contentDom);
    var domElement = this.getDomElement();
    var value = this.GetSubmittedValue(component, domElement);
    this.Validate(component, value);
    this.setAriaExpanded(component, false);
  } else {
    if (popupId == AdfDhtmlSelectManyChoicePeer._FETCHING_POPUP_PANEL_ID) {
      var popupWrapperId = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlSelectManyChoicePeer._FETCHING_POPUP_WRAPPER_ID);
      var parentDom = AdfAgent.AGENT.getElementById(popupWrapperId);
      parentDom.appendChild(contentDom);
    }
  }
};
AdfDhtmlSelectManyChoicePeer.prototype.GetNoteWindowAlignmentNode = function(component, rootNode) {
  var alignmentNode = AdfDhtmlEditableValuePeer.getContentNode(component, rootNode);
  if (AdfPage.PAGE.getLocaleContext().isRightToLeft() && AdfAgent.AGENT.getPlatform() == AdfAgent.IE_PLATFORM) {
    return alignmentNode;
  } else {
    return alignmentNode.parentNode;
  }
};
AdfDhtmlSelectManyChoicePeer.prototype.GetInlineEditor = function(event) {
  return AdfDhtmlSimpleLabelEditor.getInlineEditor();
};
AdfDhtmlSelectManyChoicePeer.prototype.InitDomElement = function(component, domElement) {
  AdfDhtmlSelectManyChoicePeer.superclass.InitDomElement.call(this, component, domElement);
  var contentNode = AdfDhtmlEditableValuePeer.getContentNode(component, domElement);
  var boxes = this.GetCheckboxes(component, contentNode);
  if (boxes) {
    for (var i = 0;i < boxes.length;i++) {
      this.UpdateSelectedStyle(boxes[i]);
    }
    var selectAllCheckbox = this.GetSelectAllCheckbox(component);
    if (selectAllCheckbox != null) {
      this.UpdateSelectedStyle(selectAllCheckbox);
    }
  }
};
AdfDhtmlSelectManyChoicePeer.prototype._showPopupPanel = function(component) {
  AdfObject.ensureClassInitialization(AdfRichPopup);
  var clientId = component.getClientId();
  var domElement = this.getDomElement();
  this._setSpacerWidth(component, clientId, domElement, AdfDhtmlSelectManyChoicePeer._SPACER_ID);
  var curItem = this._getCurrentItem(component, domElement);
  var selectAllItem = this.GetSelectAllCheckbox(component);
  if (curItem != selectAllItem) {
    if (curItem && AdfDomUtils.containsCSSClassName(curItem.parentNode.parentNode, AdfDhtmlSelectManyChoicePeer._HIGHLIGHTED_STYLE)) {
      AdfDomUtils.removeCSSClassName(curItem.parentNode.parentNode, AdfDhtmlSelectManyChoicePeer._HIGHLIGHTED_STYLE);
    }
  }
  if (selectAllItem) {
    curItem = selectAllItem;
  } else {
    curItem = this._getCurrentItem(component, domElement);
  }
  if (curItem && !AdfDomUtils.containsCSSClassName(curItem.parentNode.parentNode, AdfDhtmlSelectManyChoicePeer._HIGHLIGHTED_STYLE)) {
    AdfDomUtils.addCSSClassName(curItem.parentNode.parentNode, AdfDhtmlSelectManyChoicePeer._HIGHLIGHTED_STYLE);
  }
  var popupContentId = AdfRichUIPeer.CreateSubId(clientId, AdfDhtmlSelectManyChoicePeer._POPUP_ID);
  var contentDom = AdfAgent.AGENT.getElementById(popupContentId);
  contentDom.parentNode.removeChild(contentDom);
  this.setAriaExpanded(component, true);
  this.showPopup(component, contentDom, this._getPopupHints(component, true), AdfDhtmlSelectManyChoicePeer._POPUP_PANEL_ID);
};
AdfDhtmlSelectManyChoicePeer.prototype.setAriaExpanded = function(component, isExpanded) {
  var contentNode = AdfDhtmlEditableValuePeer.getContentNode(component);
  AdfAgent.AGENT.setAttribute(contentNode, "aria-expanded", isExpanded);
};
AdfDhtmlSelectManyChoicePeer.prototype._showFetchingDataPopup = function(component) {
  AdfObject.ensureClassInitialization(AdfRichPopup);
  var clientId = component.getClientId();
  var domElement = this.getDomElement();
  this._setSpacerWidth(component, clientId, domElement, AdfDhtmlSelectManyChoicePeer._FETCHING_SPACER_ID);
  var popupContentId = AdfRichUIPeer.CreateSubId(clientId, AdfDhtmlSelectManyChoicePeer._FETCHING_POPUP_ID);
  var contentDom = AdfAgent.AGENT.getElementById(popupContentId);
  contentDom.parentNode.removeChild(contentDom);
  this.showPopup(component, contentDom, this._getPopupHints(component, false), AdfDhtmlSelectManyChoicePeer._FETCHING_POPUP_PANEL_ID);
};
AdfDhtmlSelectManyChoicePeer.prototype._setSpacerWidth = function(component, clientId, domElement, spacerSubId) {
  var spacerId = AdfRichUIPeer.CreateSubId(clientId, spacerSubId);
  var spacerNode = AdfAgent.AGENT.getElementById(spacerId);
  var contentNode = AdfDhtmlEditableValuePeer.getContentNode(component, domElement);
  spacerNode.style.width = contentNode.parentNode.offsetWidth - 7 + "px";
};
AdfDhtmlSelectManyChoicePeer.prototype._getPopupHints = function(component, focus) {
  var popupHints = {};
  popupHints[AdfDhtmlPopupHints.TYPE] = AdfDhtmlPopupHints.TYPE_MENU;
  popupHints[AdfRichPopup.HINT_ALIGN] = AdfRichPopup.ALIGN_AFTER_START;
  popupHints[AdfRichPopup.HINT_ALIGN_ID] = AdfDhtmlEditableValuePeer.GetContentNodeId(component);
  popupHints[AdfDhtmlPopupHints.AUTODISMISS] = AdfDhtmlPopupHints.AUTODISMISS_MENU;
  popupHints[AdfDhtmlPopupHints.FOCUS] = focus;
  return popupHints;
};
AdfDhtmlSelectManyChoicePeer.prototype._getDropDownImgElement = function(component) {
  var dropDownArrowId = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlSelectManyChoicePeer._DROPDOWN_ID);
  return AdfAgent.AGENT.getElementById(dropDownArrowId);
};
AdfDhtmlSelectManyChoicePeer.prototype._getCurrentItem = function(component, domElement) {
  var currentItem = this.GetSelectAllCheckbox(component);
  var boxes = this.GetCheckboxes(component, domElement);
  var firstEnabled = null;
  if (boxes) {
    for (var i = 0;i < boxes.length;i++) {
      cb = boxes[i];
      if (!firstEnabled && !cb.disabled) {
        firstEnabled = cb;
      }
      if (AdfDomUtils.containsCSSClassName(cb.parentNode.parentNode, AdfDhtmlSelectManyChoicePeer._HIGHLIGHTED_STYLE)) {
        currentItem = cb;
        break;
      }
    }
  }
  if (currentItem == null) {
    currentItem = firstEnabled;
  }
  return currentItem;
};
AdfDhtmlSelectManyChoicePeer.prototype._highlightNewItem = function(newItem, oldItem) {
  if (oldItem && AdfDomUtils.containsCSSClassName(oldItem.parentNode.parentNode, AdfDhtmlSelectManyChoicePeer._HIGHLIGHTED_STYLE)) {
    AdfDomUtils.removeCSSClassName(oldItem.parentNode.parentNode, AdfDhtmlSelectManyChoicePeer._HIGHLIGHTED_STYLE);
    oldItem.parentNode.parentNode.removeAttribute("aria-selected");
  }
  if (newItem && !AdfDomUtils.containsCSSClassName(newItem.parentNode.parentNode, AdfDhtmlSelectManyChoicePeer._HIGHLIGHTED_STYLE)) {
    AdfDomUtils.addCSSClassName(newItem.parentNode.parentNode, AdfDhtmlSelectManyChoicePeer._HIGHLIGHTED_STYLE);
    newItem.parentNode.parentNode.setAttribute("aria-selected", "true");
  }
};
AdfDhtmlSelectManyChoicePeer.prototype._getLazyState = function() {
  var component = this.getComponent();
  if (component._lazyState == null) {
    var lazyId = AdfRichUIPeer.CreateSubId(component.getClientId(), AdfDhtmlSelectManyChoicePeer._LAZY_ID);
    var lazyComp = AdfAgent.AGENT.getElementById(lazyId);
    component._lazyState = lazyComp != null ? AdfDhtmlSelectManyChoicePeer._LAZY_STATE_NO_CONTENT : AdfDhtmlSelectManyChoicePeer._LAZY_STATE_CONTENT_LOADED;
  }
  return component._lazyState;
};
AdfDhtmlSelectManyChoicePeer.prototype._setLazyState = function(newState) {
  var component = this.getComponent();
  component._lazyState = newState;
};
