AdfRichUIPeer.createPeerClass(AdfDhtmlInputBasePeer,"AdfDhtmlInputListOfValuesSuperBasePeer");
AdfDhtmlInputListOfValuesSuperBasePeer.InitSubclass=function(){AdfRichUIPeer.addComponentEventHandlers(this,AdfUIInputEvent.DOUBLE_CLICK_EVENT_TYPE,AdfPopupOpeningEvent.POPUP_OPENING_EVENT_TYPE,AdfPopupClosedEvent.POPUP_CLOSED_EVENT_TYPE,AdfDialogEvent.EVENT_TYPE,AdfUIInputEvent.KEY_PRESS_EVENT_TYPE);this._POPUP_SUFFIX_ID="_afrLovPopupId";this._SHOWN="_shown";this._DIALOG_CONTENT_HEIGHT="_dialogContentHeight";this._DIALOG_CONTENT_WIDTH="_dialogContentWidth";this._INTERNAL_TABLE_SUFFIX_ID="_afrLovInternalTableId";
this._INTERNAL_QUERY_ID="_afrLovInternalQueryId";this._LOVINTERNAL_EVENT_QUEUED="_afrLovInternalEventQueued";this._LOVINTERNAL_DIALOG_SUFFIX_ID="_afrLovDialogId";this._OK_PRESSED=!1;this._EDIT_MODE_SELECT="select";this._clientId=null;AdfRichUIPeer.addSuppressedPPRAttributes(this,AdfDhtmlInputListOfValuesSuperBasePeer._DIALOG_CONTENT_HEIGHT,AdfDhtmlInputListOfValuesSuperBasePeer._DIALOG_CONTENT_WIDTH,AdfDhtmlInputListOfValuesSuperBasePeer._SHOWN)};
AdfDhtmlInputListOfValuesSuperBasePeer.FocusInputElement=function(a){a=AdfDhtmlEditableValuePeer.getContentNode(a);AdfDhtmlInputBasePeer.setLastValue(a);AdfFocusUtils.focusElement(a)};
AdfDhtmlInputListOfValuesSuperBasePeer.GetLabelText=function(a){var b=a.getLabel();if(b)return b;b=AdfDhtmlEditableValuePeer.getContentNode(a);if(b=b.labels?b.labels[0]:document.querySelector("label[for\x3d'"+AdfDhtmlEditableValuePeer.GetContentNodeId(a)+"']"))return b.textContent;AdfLogger.LOGGER.info("Application hasn't provided label for ",a.getClientId())};AdfDhtmlInputListOfValuesSuperBasePeer.prototype.AnnounceAutoComplete=function(){AdfAssert.failedInAbstractFunction()};
AdfDhtmlInputListOfValuesSuperBasePeer.prototype.HandleComponentClickOrTouch=function(a){AdfAssert.failedInAbstractFunction()};
AdfDhtmlInputListOfValuesSuperBasePeer.prototype.ComponentRemoved=function(a){var b=this._busyStateListenerCallback;b&&this.getComponent()==a&&(AdfPage.PAGE.removeBusyStateListener(this,b),delete this._busyStateListenerCallback);(b=this._popupClosedCallback)&&AdfLogger.LOGGER.info("Potential callback leak detected - LOV _popupClosedCallback: ",b);AdfDhtmlInputListOfValuesSuperBasePeer.superclass.ComponentRemoved.call(this,a)};
AdfDhtmlInputListOfValuesSuperBasePeer.prototype.SetDisplayValue=function(a,b,d){AdfAssert.assertString(d);b=AdfDhtmlEditableValuePeer.getContentNode(a);var e="INPUT"==b.tagName;a.getReadOnly()?AdfAgent.AGENT.setTextContent(b,d):(b.title=d,e?b.value=d:AdfAgent.AGENT.setTextContent(b,d))};
AdfDhtmlInputListOfValuesSuperBasePeer.prototype.HandleComponentDblClick=function(a){var b=a.getSource();if(b instanceof AdfRichTable){a=this.getComponent();for(b=b.getParent();b!=a&&null!=b;){if(b instanceof AdfRichDialog){(new AdfDialogEvent(b,AdfDialogEvent.OUTCOME_OK)).queue();break}b=b.getParent()}}};
AdfDhtmlInputListOfValuesSuperBasePeer.prototype.HandleComponentDialog=function(a){var b=this.getComponent(),d=a.getSource(),e=b.getClientId()+AdfDhtmlInputListOfValuesSuperBasePeer._LOVINTERNAL_DIALOG_SUFFIX_ID;if(d.getClientId()==e){a.setRoot(b);if(this._OK_PRESSED=a.getOutcome()==AdfDialogEvent.OUTCOME_OK){e=b.getClientId()+AdfDhtmlInputListOfValuesSuperBasePeer._INTERNAL_QUERY_ID;if(e=AdfPage.PAGE.findComponent(e)){var f=e.getPeer();f.bind(e);if(!f.validateCriterionFields()){a.cancel();a.stopBubbling();
return}this.bind(b)}AdfReturnPopupDataEvent.queue(b,!0)}else AdfLovInternalPopupClosedEvent.queue(b,AdfLovInternalPopupClosedEvent.OPERATION_CANCEL,!0);AdfDhtmlInputListOfValuesSuperBasePeer.FocusInputElement(b);if(a=this._busyStateListenerCallback)AdfPage.PAGE.removeBusyStateListener(this,a),delete this._busyStateListenerCallback;b.setProperty(AdfDhtmlInputListOfValuesSuperBasePeer._DIALOG_CONTENT_HEIGHT,d.getContentHeight(),!1,AdfUIComponent.PROPAGATE_ALWAYS);b.setProperty(AdfDhtmlInputListOfValuesSuperBasePeer._DIALOG_CONTENT_WIDTH,
d.getContentWidth(),!1,AdfUIComponent.PROPAGATE_ALWAYS)}};
AdfDhtmlInputListOfValuesSuperBasePeer.prototype.HandleComponentKeyUp=function(a){var b=this.getComponent(),d=a.getKeyCode();if((AdfKeyStroke.ENTER_KEY==d||AdfKeyStroke.TAB_KEY==d)&&b.getProperty(AdfDhtmlInputListOfValuesSuperBasePeer._LOVINTERNAL_EVENT_QUEUED))a.cancel(),a.stopBubbling(),b.setProperty(AdfDhtmlInputListOfValuesSuperBasePeer._LOVINTERNAL_EVENT_QUEUED,!1,!1,AdfUIComponent.PROPAGATE_NEVER);else{if(!a.isCanceled()&&AdfKeyStroke.ENTER_KEY==d){var e=b.getClientId()+AdfDhtmlInputListOfValuesSuperBasePeer._INTERNAL_TABLE_SUFFIX_ID,
f=a.getSource().getClientId();if(f&&f==e){a.cancel();a.stopBubbling();return}}a.getEventPhase()==AdfBaseEvent.AT_TARGET_PHASE&&(d!=AdfKeyStroke.TAB_KEY&&this.AutoTab(b,a.getNativeEventTarget()),delete this._nodeLength);AdfDhtmlInputListOfValuesSuperBasePeer.superclass.HandleComponentKeyUp.call(this,a)}};
AdfDhtmlInputListOfValuesSuperBasePeer.prototype.AutoTab=function(a,b){if(a.getAutoTab&&a.getAutoTab()){var d=a.getMaximumLength();if(!(1>d)){var e=b.value?b.value.length:0;e>=d&&e>this._nodeLength&&this.FocusNextElement(b)}}};AdfDhtmlInputListOfValuesSuperBasePeer.prototype.FocusNextElement=function(a){AdfAssert.failedInAbstractFunction()};
AdfDhtmlInputListOfValuesSuperBasePeer.prototype.HandleComponentKeyPress=function(a){this.StopArrowKeyBubbling(a);var b=this.getComponent(),d=a.getKeyCode();if((AdfKeyStroke.ENTER_KEY==d||AdfKeyStroke.TAB_KEY==d)&&b.getProperty(AdfDhtmlInputListOfValuesSuperBasePeer._LOVINTERNAL_EVENT_QUEUED))a.cancel(),a.stopBubbling();else{if(!a.isCanceled()&&AdfKeyStroke.ENTER_KEY==d&&(b=b.getClientId()+AdfDhtmlInputListOfValuesSuperBasePeer._INTERNAL_TABLE_SUFFIX_ID,(d=a.getSource().getClientId())&&d==b)){a.cancel();
a.stopBubbling();return}a=a.getNativeEventTarget();this._nodeLength=a.value?a.value.length:0}};
AdfDhtmlInputListOfValuesSuperBasePeer.prototype.HandleComponentKeyDown=function(a){this.StopArrowKeyBubbling(a);var b=a.getKeyCode(),d=this.getComponent();switch(b){case AdfKeyStroke.ENTER_KEY:if(window.AdfAutoSuggestBehaviorImpl&&AdfAutoSuggestBehaviorImpl.isPopupVisible(d,this)){a.cancel();a.stopBubbling();break}case AdfKeyStroke.TAB_KEY:var e=a.getNativeEventTarget();this.IsKeyEventInInput(d,a)&&(this._queueLovInternalEvent(d,e)?(a.cancel(),a.stopBubbling(),d.setProperty(AdfDhtmlInputListOfValuesSuperBasePeer._LOVINTERNAL_EVENT_QUEUED,
!0,!1,AdfUIComponent.PROPAGATE_NEVER),b==AdfKeyStroke.TAB_KEY&&(this.preventNextValueSubmission(),AdfFocusUtils.focusNextTabStop(e))):b==AdfKeyStroke.ENTER_KEY&&this.RunValidation(d,e));break;case AdfKeyStroke.BACKSPACE_KEY:d.getEditMode()==AdfDhtmlInputListOfValuesSuperBasePeer._EDIT_MODE_SELECT&&this.IsCancelBackSpaceKeyEvent(d,a)&&a.cancel()}};AdfDhtmlInputListOfValuesSuperBasePeer.prototype.IsCancelBackSpaceKeyEvent=function(a,b){AdfAssert.failedInAbstractFunction()};
AdfDhtmlInputListOfValuesSuperBasePeer.prototype.IsKeyEventInInput=function(a,b){var d=AdfDhtmlEditableValuePeer.GetContentNodeId(a);return b.getNativeEventTarget().id==d?!0:!1};
AdfDhtmlInputListOfValuesSuperBasePeer.prototype.HandleComponentPopupClosed=function(a){a=a.getSource();var b=this.getComponent(),d=b.getClientId()+AdfDhtmlInputListOfValuesSuperBasePeer._POPUP_SUFFIX_ID;a.getClientId()==d&&(AdfDhtmlInputListOfValuesSuperBasePeer._setShown(b,null),!0==this._OK_PRESSED&&AdfReturnPopupDataEvent.queue(b,!0))};
AdfDhtmlInputListOfValuesSuperBasePeer.prototype.HandleComponentPopupOpening=function(a){a=a.getSource();var b=this.getComponent(),d=b.getClientId();a==AdfDhtmlInputListOfValuesSuperBasePeer._getLovPopup(d)&&(this.HideNoteWindow(),AdfDhtmlInputListOfValuesSuperBasePeer._setShown(b,d),a=this._busyStateListenerCallback,a||(this._busyStateListenerCallback=a=this.createCallback(this._busyStateListener)),AdfPage.PAGE.addBusyStateListener(this,a))};
AdfDhtmlInputListOfValuesSuperBasePeer.prototype._busyStateListener=function(a){var b=this.getComponent();null==b&&AdfLogger.LOGGER.severe("Unexpected null component! ",a);b=b.getClientId();if(this.IsLovPopupVisible(b)){var b=b+AdfDhtmlInputListOfValuesSuperBasePeer._LOVINTERNAL_DIALOG_SUFFIX_ID,d=AdfPage.PAGE.findComponent(b);d&&d.getPeer().__setDefaultButtonDisabled(b,a.isBusy())}};
AdfDhtmlInputListOfValuesSuperBasePeer.prototype.IsLovPopupVisible=function(a){return(a=AdfDhtmlInputListOfValuesSuperBasePeer._getLovPopup(a))&&a.isPopupVisible()?!0:!1};AdfDhtmlInputListOfValuesSuperBasePeer.prototype.ShowNoteWindow=function(a,b){a||(a=this.getComponent());a&&this.getDomElement()&&AdfDhtmlInputListOfValuesSuperBasePeer.superclass.ShowNoteWindow.call(this,a,b)};
AdfDhtmlInputListOfValuesSuperBasePeer.prototype.IsNoteWindowVisible=function(a){a||(a=this.getComponent());return a&&this.getDomElement()?AdfDhtmlInputListOfValuesSuperBasePeer.superclass.IsNoteWindowVisible.call(this,a):!1};
AdfDhtmlInputListOfValuesSuperBasePeer.prototype._queueLovInternalEvent=function(a,b){var d=AdfDhtmlEditableValuePeer.getContentNode(a);if(b==d&&"INPUT"==b.tagName){var e=AdfDhtmlInputBasePeer.getLastValue(d),f=b.value;if(f!=e&&0<f.length&&a.getAutoSubmit())return AdfDhtmlInputBasePeer.setLastValue(d,f),AdfLovInternalEvent.queue(a,AdfLovInternalEvent.ACTION_TAB,!0),!0}return!1};AdfDhtmlInputListOfValuesSuperBasePeer._getLovPopup=function(a){return AdfPage.PAGE.findComponent(a+AdfDhtmlInputListOfValuesSuperBasePeer._POPUP_SUFFIX_ID)};
AdfDhtmlInputListOfValuesSuperBasePeer._setShown=function(a,b){a.setProperty(AdfDhtmlInputListOfValuesSuperBasePeer._SHOWN,b,!1,!0)};
AdfDhtmlInputListOfValuesSuperBasePeer.prototype.showToolbarPopup=function(a,b){this._clientId=a;var d=a+"_afrLovToolbar",e=AdfPage.PAGE.findComponent(b);null!=e&&(this._popupClosedCallback||(this._popupClosedCallback=this.createCallback(this._toolbarPopupClosed),e.addEventListener(AdfPopupClosedEvent.POPUP_CLOSED_EVENT_TYPE,this._popupClosedCallback)),e.show({align:AdfRichPopup.ALIGN_AFTER_END,alignId:d}))};
AdfDhtmlInputListOfValuesSuperBasePeer.prototype._toolbarPopupClosed=function(a){a=AdfPage.PAGE.findComponent(this._clientId);null!=a&&AdfLovInternalPopupClosedEvent.queue(a,AdfLovInternalPopupClosedEvent.OPERATION_TOOLBAR_CLOSED,!0)};