AdfUIPeer.createPeerClass(AdfUIPeer,"AdfRichUIPeer");AdfRichUIPeer.createPeerClass=function(a,b,c,d){AdfAssert.assertFunction(a);AdfAssert.assertString(b);AdfAssert.assertBooleanOrNull(c);AdfAssert.assertObjectOrNull(d);b=AdfUIPeer.createPeerClass(a,b,d);(a=a.STATELESS)||(a=!0);null==c?c=a:AdfAssert.assert(!c||a,"Can't create a stateless subclass of a stateful superclass");b.InitClass=AdfRichUIPeer.DefaultInitClass;b.STATELESS=!1!==c;return b};
AdfRichUIPeer.createInnerPeerClassWithSubId=function(a,b,c){var d=b+"Shim";a=AdfRichUIPeer.createPeerClass(a,d,!1);b=AdfRichUIPeer.createPeerClass(a,b,!1);d=new Function("c","o","AdfRichUIPeer._innerInit.call(this,"+d+", c, o)");a.prototype._subId=c;a.prototype.Init=d;a.prototype.initialize=AdfRichUIPeer._innerSubIdInitialize;return b};
AdfRichUIPeer._innerSubIdInitialize=function(a){AdfAssert.assertPrototype(a,AdfUIComponent);var b=a.getClientId(),b=AdfRichUIPeer.CreateSubId(b,this._subId),b=AdfAgent.AGENT.getElementById(b);AdfAssert.assertDomNode(b);AdfAssert.assert(!this.constructor.STATELESS);this.InitDomElement(a,b);this.BindToComponent(a,b)};AdfRichUIPeer._innerInit=function(a,b,c){AdfAssert.assertPrototype(b,AdfUIComponent);AdfAssert.assertPrototype(c,AdfRichUIPeer);this.outerThis=c;a.superclass.Init.call(this,b)};
AdfRichUIPeer.isComponentContainedByElement=function(a,b){if(a&&b){var c=AdfRichUIPeer.getDomNodeForComponent(a);return AdfDomUtils.isAncestorOrSelf(b,c)}return!1};AdfRichUIPeer.prototype.getDomDocument=function(){return AdfPage.PAGE.getDomDocument()};
AdfRichUIPeer.prototype.getComponentParent=function(a){this.bind(a);var b=AdfRichUIPeer.getFirstAncestorComponent(this.getDomNode().parentNode);if(b){a=a.getClientId();var c=a.lastIndexOf(":");if(-1!=c&&(a=a.substring(0,c),!AdfAgent.AGENT.getElementById(a)&&(a=AdfPage.PAGE.findComponent(a))))for(c=a.getParent();c;){if(c===b){b=a;break}c=c.getParent()}}return b};
AdfRichUIPeer.prototype._truncateClientId=function(a,b,c,d){this.TruncateClientId(a,b,c,d);a=this.getComponentParent(a);null!=a&&a.getPeer()._truncateClientId(a,b,c,d)};AdfRichUIPeer.prototype.TruncateClientId=function(a,b,c,d){};AdfRichUIPeer.TruncateClientIdOnceImpl=function(a,b,c,d){a=a.getClientId();a=AdfStrings.count(a,":");d.push(a+1)};
AdfRichUIPeer.prototype.getAbsoluteId=function(a,b){var c=[];this._truncateClientId(a,a,b,c);var d=c.length;if(0<d){var e=b.split(":"),f=e.length;if(1==f)return b;for(var g=Array(f-d),h=0,d=d-1,k=c[d],l=0;l<f;l++)l!=k?g[h++]=e[l]:k=0<d?c[--d]:-1;return g.join(":")}return b};
AdfRichUIPeer.prototype.getAbsoluteLocator=function(a,b){var c;c=[];this._fixClientId(a,a,b,c);var d=c.length;if(0<d){var e=b.split(":"),f=e.length;if(d>f)return b;for(var g=Array(f-d),h=0,d=d-1,k=c[d][0],l=0;l<f;l++)l==k?(null!=c[d][1]&&(k=0<h?h-1:0,g[k]=g[k]+"["+c[d][1]+"]"),k=0<d?c[--d][0]:-1):g[h++]=e[l];c=g.join(":")}else c=b;window.AdfDhtmlIteratorPeer&&(c=AdfDhtmlIteratorPeer.fixupIteratorAbsoluteLocator(c,a));return c};
AdfRichUIPeer.prototype.convertLocatorToClientId=function(a,b){AdfAssert.assert(!1,"Incorrect use of [] locator notation for component :"+a)};
AdfRichUIPeer.getLocatorByDomElement=function(a){AdfAssert.assertDomElement(a);for(var b,c=AdfPage.PAGE,d=a;d&&(!b||b.getProperty("nested"));d=d.parentNode){var e=d.id;b&&b.getProperty("nested")?b=b.getParent():e&&(b=e.lastIndexOf(":"),0==e.substr(b+1).indexOf(AdfRichUIPeer._FILTER_PREFIX)&&(b++,e=e.substr(0,b)+e.substr(b+AdfRichUIPeer._FILTER_PREFIX.length)),b=c.findComponent(e))}return b&&(c=b.getPeer())?(c.bind(b),a=c.GetBestMatchSubId(a),b=b.getAbsoluteLocator(),a?b+"#"+a:b):null};
AdfRichUIPeer.prototype.GetBestMatchSubId=function(a){if(this.GetSubIdDomElement==AdfRichUIPeer.prototype.GetSubIdDomElement)return null;AdfAssert.failedInAbstractFunction()};AdfRichUIPeer.prototype._fixClientId=function(a,b,c,d){this.ConvertClientIdToLocator(a,b,c,d);b=this.getComponentParent(a);null!=b&&b.getPeer()._fixClientId(b,a,c,d)};AdfRichUIPeer.prototype.ConvertClientIdToLocator=function(a,b,c,d){};
AdfRichUIPeer.prototype.getDescendantComponents=function(a,b){var c;c=a instanceof AdfRichPopup?AdfDhtmlPopupPeer.getContentDom(a):AdfRichUIPeer.getDomElementForComponent(a);AdfAssert.assertDomElement(c);return AdfAgent.AGENT.getDescendantComponentsForNode(c,b)};AdfRichUIPeer.prototype.getComponentProperty=function(a,b){var c=this.constructor._componentPropertyGetters[b];if(c)return this.bind(a),c.call(this,a,this.getDomElement())};AdfRichUIPeer.prototype.getReadyState=function(a){this.bind(a);return this.GetReadyState()};
AdfRichUIPeer.prototype.GetReadyState=function(){return AdfUIComponent.STATE_COMPLETE};AdfRichUIPeer.prototype.getInlineEditor=function(a,b){this.bind(a);return this.GetInlineEditor(b)};AdfRichUIPeer.prototype.GetInlineEditor=function(a){return null};AdfRichUIPeer.prototype.getDragTransferable=function(a,b){this.bind(a);return this.GetDragTransferable(b)};AdfRichUIPeer.prototype.GetDragTransferable=function(a){return null};AdfRichUIPeer.prototype.getDragOverFeedback=function(a,b){this.bind(a);return this.GetDragOverFeedback(b)};
AdfRichUIPeer.prototype.GetDragOverFeedback=function(a){return AdfRichUIPeer.CreateDraggableNode(this.getDomElement())};AdfRichUIPeer.prototype.applyDragReadyState=function(a,b){this.bind(a);return this.ApplyDragReadyState(b)};AdfRichUIPeer.prototype.clearDragReadyState=function(a,b){this.bind(a);this.ClearDragReadyState(b)};AdfRichUIPeer.prototype.applyDragSourceState=function(a,b){this.bind(a);return this.ApplyDragSourceState(b)};
AdfRichUIPeer.prototype.clearDragSourceState=function(a,b){this.bind(a);this.ClearDragSourceState(b)};AdfRichUIPeer.prototype.ApplyDragReadyState=function(a){a=this.getDomContentElement();AdfDomUtils.addCSSClassName(a,AdfRichUIPeer.DRAG_READY_STYLECLASS);return a};AdfRichUIPeer.prototype.ClearDragReadyState=function(a){AdfAssert.assertDomElement(a);AdfDomUtils.removeCSSClassName(a,AdfRichUIPeer.DRAG_READY_STYLECLASS)};
AdfRichUIPeer.prototype.ApplyDragSourceState=function(a){a=this.getDomContentElement();AdfDomUtils.addCSSClassName(a,AdfRichUIPeer.DRAG_SOURCE_STYLECLASS);return a};AdfRichUIPeer.prototype.ClearDragSourceState=function(a){AdfAssert.assertDomElement(a);AdfDomUtils.removeCSSClassName(a,AdfRichUIPeer.DRAG_SOURCE_STYLECLASS)};AdfRichUIPeer.CreateDraggableNode=function(a){return AdfAgent.AGENT.createDraggableNode(a)};
AdfRichUIPeer.prototype.replaceDomElement=function(a,b,c){this.bind(a);this.ReplaceDomElement(b,c)};AdfRichUIPeer.prototype.ReplaceDomElement=function(a,b){AdfPage.PAGE.__replaceDomElement(a,b)};AdfRichUIPeer.prototype.domReplaceNotify=function(a,b){this.bind(a);return this.DomReplaceNotify(b)};AdfRichUIPeer.prototype.DomReplaceNotify=function(a){return a};AdfRichUIPeer.createSubId=function(a,b){var c=AdfRichUIPeer._CREATE_SUB_ID_ARRAY;c[0]=a;c[2]=b;return c.join("")};AdfRichUIPeer.CreateSubId=AdfRichUIPeer.createSubId;
AdfRichUIPeer._sliceArgumentsArray=function(a,b){var c=a.length-b;if(0<c){for(var d=Array(c),e=b,f=0;f<c;e++,f++)d[f]=a[e];return d}return null};AdfRichUIPeer.addSuppressedPPRAttributes=function(a,b){AdfRichUIPeer._addSuppressedPPRAttributes(a,AdfRichUIPeer._sliceArgumentsArray(arguments,1))};
AdfRichUIPeer._addSuppressedPPRAttributes=function(a,b){AdfAssert.assertFunction(a);var c=a._pprSuppressedProperties;if(null==c&&(c={},a._pprSuppressedProperties=c,a!=AdfRichUIPeer)){var d=a.superclass.constructor._pprSuppressedProperties,e;for(e in d)c[e]=!0}if(b){d=b.length;for(e=0;e<d;e++){var f=b[e];AdfAssert.assertString(f);c[f]=!0}}};AdfRichUIPeer.addComponentPropertyGetters=function(a,b){AdfRichUIPeer._addComponentPropertyGetters(a,AdfRichUIPeer._sliceArgumentsArray(arguments,1))};
AdfRichUIPeer._addComponentPropertyGetters=function(a,b){AdfRichUIPeer._initializeCallbacks(a,"_componentPropertyGetters",AdfRichUIPeer._GET_COMPONENT_FORMAT,null,b)};AdfRichUIPeer.addDomEventHandlers=function(a,b){AdfRichUIPeer._addDomEventHandlers(a,AdfRichUIPeer._sliceArgumentsArray(arguments,1))};AdfRichUIPeer._addDomEventHandlers=function(a,b){AdfRichUIPeer._initializeCallbacks(a,"_domEventHandlers",AdfRichUIPeer._HANDLE_DOM_EVENT_FORMAT,AdfDhtmlLookAndFeel.EVENT_TYPE_TO_CAMEL_CASE_MAP,b)};
AdfRichUIPeer.addComponentEventHandlers=function(a,b){AdfRichUIPeer._addComponentEventHandlers(a,AdfRichUIPeer._sliceArgumentsArray(arguments,1))};AdfRichUIPeer._addComponentEventHandlers=function(a,b){AdfRichUIPeer._initializeCallbacks(a,"_componentEventHandlers",AdfRichUIPeer._HANDLE_COMPONENT_EVENT_FORMAT,null,b)};AdfRichUIPeer.addComponentPropertyChanges=function(a,b){AdfRichUIPeer._addComponentPropertyChanges(a,AdfRichUIPeer._sliceArgumentsArray(arguments,1))};
AdfRichUIPeer._addComponentPropertyChanges=function(a,b){AdfRichUIPeer._initializeCallbacks(a,"_componentPropertyChanges",AdfRichUIPeer._PROPERTY_CHANGED_FORMAT,null,b)};
AdfRichUIPeer._initializeCallbacks=function(a,b,c,d,e){AdfAssert.assertFunction(a);AdfAssert.assertString(b);AdfAssert.assertArray(c);AdfAssert.assertObjectOrNull(d);AdfAssert.assertArrayOrNull(e);var f=a.prototype,g,h=a[b];if(null==h&&(h={},a[b]=h,a!=AdfRichUIPeer)){b=a.superclass.constructor[b];for(var k in b)g=null!=d?d[k]:k,c[1]=AdfStrings.initUpperCase(g),h[k]=f[c.join("")]}if(null!=e){b=e.length;for(var l=0;l<b;l++){k=e[l];g=null!=d?d[k]:k;c[1]=AdfStrings.initUpperCase(g);g=c.join("");var m=
f[g];AdfAssert.DEBUG&&AdfAssert.assert(m,"No callback for:"+g+" on "+AdfObject.getTypeName(a));h[k]=m}}};
AdfRichUIPeer.prototype.ComponentPropertyChanged=function(a){var b=a.getPropertyName(),c=a.getSource(),d=this.constructor,e=d._componentPropertyChanges[b],f=!1;e&&(this.bind(c),f=e.call(this,c,this.getDomElement(),a.getNewValue(),a.getOldValue()),void 0===f&&(f=!0));f?AdfPage.PAGE.__queueDescendantResizeNotifySource(c):b in d._pprSuppressedProperties||(a=c.getPropertyKeys()[b],null!=a&&!a[AdfUIComponent.PROPERTY_DISCONNECTED]&&AdfPage.PAGE.addPartialTargets(c))};
AdfRichUIPeer.prototype.ComponentVisibleChanged=function(a,b,c,d){AdfAssert.assertBoolean(c);d=!1;var e=a.getParent();if(e){var f=e.getPeer();f&&f.needsChildVisibilityChanges()&&(f.bind(e),d=f.ChildVisibilityChanged(a,b,c))}d||(AdfDomUtils.setVisible(b,c),c&&AdfPage.PAGE.doResizeNotifyDom(b,!1))};AdfRichUIPeer.prototype.GetComponentVisible=function(a,b){return AdfDomUtils.isVisible(b)};
AdfRichUIPeer.prototype.GetComponentId=function(a,b){var c=a.getClientId(),d=c.lastIndexOf(":");return c.substr(d+1)};
AdfRichUIPeer.prototype.ComponentInlineStyleChanged=function(a,b,c,d){AdfAssert.assertStringOrNull(c);null==c&&(c="");a=b.style.cssText;if(null!=a)if(null==d)";"!=a[a.length-1]&&(a+=";"),c=a+c;else if(d=d.replace(/\s*:\s*/g,":"),a=a.replace(/\s*:\s*/g,":"),d.length<a.length){var e=a.indexOf(d);0==e?(d=a.substring(d.length),";"!=d[d.length-1]&&(d+=";"),c=d+c):0<e&&(c=a.substring(0,e)+c)}b.style.cssText=c};
AdfRichUIPeer.prototype.ComponentStyleClassChanged=function(a,b,c,d){AdfAssert.assertStringOrNull(c);null!=d&&AdfDomUtils.removeCSSClassName(b,d);AdfDomUtils.addCSSClassName(b,c)};AdfRichUIPeer.prototype.getInlineStyleProperty=function(a,b){AdfAssert.assertPrototype(a,AdfUIComponent);var c=AdfRichUIPeer.getDomElementForComponent(a).style,d=AdfAgent.AGENT.getDomForCSSPropertyName(b);return c[d]};
AdfRichUIPeer.prototype.setInlineStyleProperty=function(a,b,c){AdfAssert.assertPrototype(a,AdfUIComponent);a=AdfRichUIPeer.getDomElementForComponent(a).style;b=AdfAgent.AGENT.getDomForCSSPropertyName(b);a[b]=c};AdfRichUIPeer.prototype.setBusy=function(a,b){AdfAssert.assertPrototype(a,AdfUIComponent);AdfAssert.assertBoolean(b);var c=AdfRichUIPeer.getDomContentElementForComponent(a);null!=c&&AdfDomUtils.addOrRemoveCSSClassName(b,c,AdfRichUIPeer.BUSY_STYLECLASS)&&(this.bind(a),this.SetBusy(b))};
AdfRichUIPeer.prototype.SetBusy=function(a){AdfAssert.assertBoolean(a)};AdfRichUIPeer.prototype.isBusy=function(){return!1};AdfRichUIPeer.registerKeyStroke=function(a,b,c){AdfAssert.assertPrototype(a,AdfUIComponent);AdfAssert.assertPrototype(b,AdfKeyStroke);AdfAssert.assertFunction(c);AdfPage.PAGE.registerKeyStroke(b,AdfRichUIPeer._keystrokeCallback,{clientId:a.getClientId(),callback:c})};
AdfRichUIPeer.unregisterKeyStroke=function(a,b){AdfAssert.assertPrototype(a,AdfUIComponent);AdfAssert.assertPrototype(b,AdfKeyStroke);AdfPage.PAGE.unregisterKeyStroke(b,a.getClientId())};AdfRichUIPeer._keystrokeCallback=function(a){AdfAssert.assertPrototype(a,AdfKeyStroke);var b=AdfPage.PAGE.findComponent(this.clientId);if(null==b)return!1;var c=b.getPeer();c.bind(b);return this.callback.call(c,a)};AdfRichUIPeer.getDomElementForComponent=function(a){AdfAssert.assertObject(a);return AdfAgent.AGENT.getElementById(a.getClientId())};
AdfRichUIPeer.getDomNodeForComponent=function(a){AdfAssert.assertPrototype(a,AdfUIComponent);var b=AdfAgent.AGENT.getElementById(a.getClientId());if(!b){var c=a.getPeer();c&&(b=c.getDomNode());b||(b=AdfRichUIPeer.GetDomNodeForCommentComponent(a))}AdfAssert.assert(null!=b,"DOM node for the Id "+a.getClientId()+" is not found. This indicates a serious problem during rendering. Inspect your DOM tree and try to determine why the client component is present, while its DOM node is not");return b};
AdfRichUIPeer.GetDomNodeForCommentComponent=function(a){var b=a.getProperty("_parentId");a="compS|"+a.getClientId();if(b=AdfAgent.AGENT.getElementById(b))if(b=b.firstChild)return AdfRichUIPeer._getCommentNodeForComponent(b,a);b=AdfPage.PAGE.getDomDocument().body;a=AdfRichUIPeer._findCommentNodeWithContent(b,a);return null!=a?a:null};
AdfRichUIPeer._findCommentNodeWithContent=function(a,b){AdfAssert.assertDomNode(a);var c=a.nodeType;if(8==c){if(b==a.nodeValue)return a}else if(1==c)for(var c=a.childNodes,d=c.length,e=0,e=0;e<d;e++){var f=AdfRichUIPeer._findCommentNodeWithContent(c[e],b);if(null!=f)return f}return null};AdfRichUIPeer.getDomContentElementForComponent=function(a){a=AdfRichUIPeer.getDomNodeForComponent(a);return null==a?null:this.GetDomContentElementForNode(a)};
AdfRichUIPeer.GetDomContentElementForNode=function(a){AdfAssert.assertDomNode(a);if(8==a.nodeType)for(a=a.nextSibling;a&&1!=a.nodeType;)a=a.nextSibling;AdfAssert.assertDomElement(a);return a};AdfRichUIPeer._getCommentNodeForComponent=function(a,b){for(var c=a;c;){var d=c.nodeType;if(8==d){if(b==c.nodeValue)return c}else if(1==d&&(d=c.id,!d||!AdfPage.PAGE.findComponent(d)))if(d=c.firstChild)if(d=AdfRichUIPeer._getCommentNodeForComponent(d,b))return d;c=c.nextSibling}return null};
AdfRichUIPeer.prototype.getDomElement=function(){return this._domNode};AdfRichUIPeer.prototype.getDomNode=function(){return this._domNode};AdfRichUIPeer.getDomContentElement=function(){};AdfRichUIPeer.prototype.getDomContentElement=function(){return this._domNode};
AdfRichUIPeer.prototype.initialize=function(a){AdfAssert.assertPrototype(a,AdfUIComponent);AdfPage.PAGE.mapComponent(a.getClientId(),a);var b=AdfRichUIPeer.getDomNodeForComponent(a);b&&(AdfAssert.assertDomNode(b),this.InitDomElement(a,b),this.constructor.STATELESS||this.BindToComponent(a,b))};
AdfRichUIPeer.prototype.componentRemoved=function(a){AdfAssert.assertPrototype(a,AdfUIComponent);AdfAssert.assertDomNode(AdfRichUIPeer.getDomNodeForComponent(a));this.cancelAllPopups(a,!0);this.ComponentRemoved(a);this._component===a&&this.UnbindFromComponent();AdfPage.PAGE.unmapComponent(a.getClientId())};
AdfRichUIPeer.InitClass=function(a){this._PROPERTY_CHANGED_FORMAT=["Component",null,"Changed"];this._GET_COMPONENT_FORMAT=["GetComponent",null];this._HANDLE_DOM_EVENT_FORMAT=["HandleDom",null];this._HANDLE_COMPONENT_EVENT_FORMAT=["HandleComponent",null];this._CREATE_SUB_ID_ARRAY=[null,"::",null];this.addComponentPropertyChanges(this,AdfUIComponent.VISIBLE,AdfUIComponent.INLINE_STYLE,AdfUIComponent.STYLE_CLASS);this.addComponentPropertyGetters(this,AdfUIComponent.VISIBLE,AdfUIComponent.ID)};
AdfRichUIPeer.DefaultInitClass=function(a){var b=null,c=null,d=null,e=null,f=null;a&&(b=a.propertyChanges,c=a.propertyGetters,d=a.eventHandlers,e=a.domEventHandlers,f=a.suppressedPPRAttribtutes);AdfRichUIPeer._addComponentPropertyChanges(this,b);AdfRichUIPeer._addComponentPropertyGetters(this,c);AdfRichUIPeer._addComponentEventHandlers(this,d);AdfRichUIPeer._addDomEventHandlers(this,e);AdfRichUIPeer._addSuppressedPPRAttributes(this,f);b=this.InitSubclass;null==b&&(b=this.InitSubclass);null!=b&&b.call(this,
a)};AdfRichUIPeer.prototype.InitDomElement=function(a,b){};AdfRichUIPeer.prototype.ComponentRemoved=function(a){};AdfRichUIPeer.prototype.BindToComponent=function(a,b){this._component=a;this._domNode=b};AdfRichUIPeer.prototype.UnbindFromComponent=function(){this._domNode=this._component=null};
AdfRichUIPeer.prototype.bind=function(a){AdfAssert.assertPrototype(a,AdfUIComponent);AdfAssert.assert(!a.isDead(),"Attempt to bind a dead component");if(a!==this._component&&this.constructor.STATELESS){var b=AdfRichUIPeer.getDomElementForComponent(a);AdfAssert.assertDomElementOrNull(b);b||AdfAssert.assert(this instanceof AdfDhtmlImplicitPeer);this.UnbindFromComponent();this.BindToComponent(a,b)}};AdfRichUIPeer.prototype.focus=function(a){this.bind(a);this.Focus()};
AdfRichUIPeer.prototype.Focus=function(){var a=this.getDomContentElement();AdfFocusUtils.focusFirstTabStop(a)};AdfRichUIPeer.prototype.processPushData=function(a,b,c){this.bind(a);return this.ProcessPushData(b,c)};
AdfRichUIPeer.prototype.ProcessPushData=function(a,b){var c=this.getComponent(),d=!1;for(key in a){var e=a[key];AdfLogger.LOGGER.fine("On ",c," set ",key," to ",e);var f=c.setProperty(key,e,!1,AdfUIComponent.PROPAGATE_LOCALLY);if(!d&&e!==f){var d=!0,e=this.getDomElement(),f=AdfRichUIPeer._TWINKLE_TIMER_ID_ATTR,g=e.getAttribute(f),h=AdfPage.PAGE;g?h.rescheduleTimer(g,1E3):(AdfDomUtils.addCSSClassName(e,AdfRichUIPeer._TWINKLE_ON_STYLECLASS),g=h.scheduleTimer(null,AdfRichUIPeer._removeTwinkleCallback,
e.id,1E3),e.setAttribute(f,g))}}return!0};AdfRichUIPeer.prototype.registerADSAccessibility=function(a){this.bind(a);this.RegisterADSAccessibility()};AdfRichUIPeer.prototype.RegisterADSAccessibility=function(){var a=this.getComponent(),a=AdfRichUIPeer.getDomElementForComponent(a),b=AdfAgent.AGENT;a&&null==b.getAttribute(a,"aria-live")&&b.setAttribute(a,"aria-live","polite")};AdfRichUIPeer.prototype.getComponent=function(){return this._component};
AdfRichUIPeer.GetComponent=function(a){AdfAssert.assertDomElement(a);return(a=a.id)?AdfPage.PAGE.findComponent(a):null};AdfRichUIPeer.getFirstAncestorComponent=function(a){AdfAssert.assertDomNode(a);for(var b=AdfPage.PAGE,c;a;){if(1==a.nodeType){if(c=a.id)if(c=b.findComponent(c))return c;if((c=a.previousSibling)&&8==c.nodeType)if(c=b._getComponentFromComment(c))return c}a=a.parentNode}return null};
AdfRichUIPeer.prototype.visitChildren=function(a,b,c,d){AdfAssert.assertPrototype(a,AdfUIComponent);AdfAssert.assertFunction(b);AdfAssert.assertObjectOrNull(c);var e=AdfRichUIPeer.getDomElementForComponent(a),f=this._visitChildren(a,e,b,c,d);if(2!=f){var g=this.getAllPopups(a);if(null!=g)for(var h in g)if(g[h].getElement&&(e=g[h].getElement()))if(f=this._visitChildren(a,e,b,c,d),2==f)break}return f};AdfRichUIPeer.prototype.getPagePosition=function(a){this.bind(a);return AdfAgent.AGENT.getElementPosition(this._domNode)};
AdfRichUIPeer.prototype._visitChildren=function(a,b,c,d,e){b=b.firstChild;if(!b)return 0;for(var f=AdfDomUtils.isVisible,g=AdfAgent.AGENT.isElementHTML,h=AdfPage.PAGE;b;){if(1==b.nodeType&&g(b)&&(!e||f(b))){var k=0,l=null;(k=b.id)&&(l=h.findComponent(k));l&&l!=a?(k=c.call(d,l))||(k=l.visitChildren(c,d,e)):k=this._visitChildren(a,b,c,d,e);if(2==k)return 2}b=b.nextSibling}return 0};AdfRichUIPeer.prototype.createComponentEvent=function(a,b,c){this.bind(a);return this.CreateComponentEvent(b,c)};
AdfRichUIPeer.prototype.CreateComponentEvent=function(a,b){return AdfAgent.AGENT.getComponentEvent(this.getComponent(),a,b)};AdfRichUIPeer.prototype._dispatchDomEvent=function(a,b,c){AdfAssert.assertObject(c);if(a=this.constructor._domEventHandlers[c.type])this.bind(b),a.call(this,b,c)};
AdfRichUIPeer.prototype.DispatchComponentEvent=function(a){var b=this.constructor._componentEventHandlers;if(b&&(b=b[a.getType()])){var c=a.getCurrentTarget();this.bind(c,AdfRichUIPeer.getDomElementForComponent(c));b.call(this,a)}};AdfRichUIPeer.prototype.DispatchUncanceledComponentEvent=function(a){return!1};
AdfRichUIPeer.addEventHandlerToDomInstance=function(a,b,c){AdfAssert.assertFunction(a);AdfAssert.assertDomElement(b);AdfAssert.assertString(c);var d=AdfDhtmlLookAndFeel.EVENT_TYPE_TO_ATTRIBUTE_MAP[c];AdfAssert.assertString(d);AdfRichUIPeer.addDomEventHandlers(a,c);b[d]=AdfRichUIPeer._defaultInstanceEventHandler};
AdfRichUIPeer._defaultInstanceEventHandler=function(a){null==a&&(a=AdfPage.PAGE.getDomWindow().event);var b=AdfRichUIPeer.getFirstAncestorComponent(this);b&&b.getPeer()._dispatchDomEvent(AdfAgent.AGENT,b,a)};AdfRichUIPeer.prototype.isActive=function(){return this.getComponent().getClientId()==AdfPage.PAGE.getActiveComponentId()};AdfRichUIPeer.prototype.getAccessibleName=function(a){this.bind(a);return this.GetAccessibleName()};AdfRichUIPeer.prototype.GetAccessibleName=function(){};
AdfRichUIPeer.prototype.isInActiveHeirarchy=function(){var a=AdfPage.PAGE.getActiveComponentId();if(null!=a){var a=AdfPage.PAGE.findComponent(a),b=this.getComponent();do{if(b==a)return!0;a=a.getParent()}while(null!=a)}return!1};AdfRichUIPeer.prototype.needsFocusTargetStyleClass=function(){return!1};AdfRichUIPeer.prototype.needsChildVisibilityChanges=function(a){return!1};AdfRichUIPeer.prototype.ChildVisibilityChanged=function(a,b,c){return!1};
AdfRichUIPeer.prototype.resizeNotify=function(a,b,c,d,e){this.bind(a);this.ResizeNotify(b,c,d,e)};AdfRichUIPeer.prototype.ResizeNotify=function(a,b,c,d){};AdfRichUIPeer.prototype.descendantMessageChanged=function(a){this.bind(a);this.DescendantMessageChanged()};AdfRichUIPeer.prototype.messageNotify=function(a,b,c){AdfAssert.assertNumberOrNull(b);AdfAssert.assertArrayOrNull(c);this.bind(a);this.MessageNotify(b,c)};
AdfRichUIPeer.prototype.messageShow=function(a,b,c){AdfAssert.assertNumberOrNull(b);AdfAssert.assertArrayOrNull(c);this.bind(a);this.MessageShow(b,c)};AdfRichUIPeer.prototype.DescendantMessageChanged=function(){};AdfRichUIPeer.prototype.MessageNotify=function(a,b){var c=this.getDomElement(),d=AdfAgent.AGENT.getExpandoProperty(c,AdfRichUIPeer.__TYPE_ATTR);d!=a&&(AdfMessageUtils.switchCSSClassName(c,d,a),AdfAgent.AGENT.setExpandoProperty(c,AdfRichUIPeer.__TYPE_ATTR,a))};
AdfRichUIPeer.prototype.MessageShow=function(a,b){};
AdfRichUIPeer.prototype.showContextMenu=function(a,b,c,d,e,f){if(b){var g;(g=c?c.findComponent(b):AdfPage.PAGE.findComponent(b))?(AdfAssert.assert(g instanceof AdfRichPopup,"Invalid popup component for context menu."),AdfAgent.AGENT.preventDefault(a),b={},b[AdfDhtmlPopupHints.TYPE]=AdfDhtmlPopupHints.TYPE_MENU,b[AdfDhtmlPopupHints.AUTODISMISS]=AdfDhtmlPopupHints.AUTODISMISS_MENU,b[AdfDhtmlPopupHints.FOCUS]=!0,f&&(b[AdfRichPopup.HINT_LAUNCH_ID]=f),null!=d?(b[AdfDhtmlPopupHints.ALIGN_ELEMENT]=d,b[AdfRichPopup.HINT_ALIGN]=
e?e:AdfRichPopup.ALIGN_AFTER_START):(a=AdfAgent.AGENT.getMousePosition(a),b[AdfDhtmlPopupHints.MOUSEPOSITION]=a),g.show(b)):c?AdfLogger.LOGGER.severe("Could not find popup for context menu ",b," from component ",c):AdfLogger.LOGGER.severe("Could not find popup for context menu ",b)}};
AdfRichUIPeer.prototype.showPopup=function(a,b,c,d){var e=a[AdfRichUIPeer._POPUP_LIST];null==e&&(a[AdfRichUIPeer._POPUP_LIST]=e={});var f={};f[AdfDhtmlPopupHints.AUTODISMISS]=AdfDhtmlPopupHints.AUTODISMISS_ALWAYS;f[AdfDhtmlPopupHints.TYPE]=AdfDhtmlPopupHints.TYPE_INLINESELECTOR;f[AdfDhtmlPopupHints.FOCUS]=!0;f[AdfDhtmlPopupHints.CLOSE_ON_ESCAPE]=!0;a._childHints&&AdfCollections.copyInto(f,a._childHints);null==d&&(d=AdfRichUIPeer._POPUP_ID_DEFAULT);AdfCollections.copyInto(f,c);c&&(c.popupId=d);f.popupId=
d;var g=e[d],h=AdfPage.PAGE;if(!g){g=AdfDhtmlPopupWindowFactory.createPopup(f);e[d]=g;var e=b.id,k=!1;e&&!h.findComponent(e)&&(AdfPage.PAGE.mapComponent(e,a),k=!0)}var e=b.parentNode,l;e&&(l=e.id);f[AdfDhtmlPopupHints.CONTENT]=b;f[AdfDhtmlPopupHints.CLOSE_HANDLER]=this.createCallback(this._popupClosedHandler);f[AdfDhtmlPopupHints.COMPONENT_CLIENT_ID]=a.getClientId();b={component:a,contentDom:b,unmap:k,popupId:d,anchorId:l};h.__addPopupInfo(a,b);if(a=c?c[AdfDhtmlPopupHints.CLOSE_HANDLER]:null)b.otherClosedHandler=
a,b.otherClosedHandlerParams=c[AdfDhtmlPopupHints.CLOSE_HANDLER_PARAM];f[AdfDhtmlPopupHints.CLOSE_HANDLER_PARAM]=b;if(a=c?c[AdfRichPopup.HINT_ALIGN_ID]:null)(a=AdfAgent.AGENT.getElementById(a))&&(f[AdfDhtmlPopupHints.ALIGN_ELEMENT]=a),f[AdfRichPopup.HINT_ALIGN_ID]=null;(c=c?c[AdfDhtmlPopupHints.ARIA_LABEL]:null)&&(f[AdfDhtmlPopupHints.ARIA_LABEL]=c);g.show(f)};AdfRichUIPeer.prototype.isPopupVisible=function(a,b){return this.getPopupWindow(a,b)?!0:!1};
AdfRichUIPeer.prototype.hidePopup=function(a,b){var c=this.getPopupWindow(a,b);c&&c.hide()};AdfRichUIPeer.prototype.hideAllPopups=function(a){a=a[AdfRichUIPeer._POPUP_LIST];if(null!=a)for(var b in a){var c=a[b];c&&c.hide&&c.hide()}};AdfRichUIPeer.prototype.cancelPopup=function(a,b){var c=this.getPopupWindow(a,b);c&&c.cancel()};AdfRichUIPeer.prototype.cancelAllPopups=function(a,b){var c=a[AdfRichUIPeer._POPUP_LIST];if(null!=c)for(var d in c){var e=c[d];e&&e.cancel&&e.cancel(b)}};
AdfRichUIPeer.prototype.getPopupWindow=function(a,b){var c=null,d=a[AdfRichUIPeer._POPUP_LIST];null!=d&&(null==b&&(b=AdfRichUIPeer._POPUP_ID_DEFAULT),c=d[b]);return c};AdfRichUIPeer.prototype.getAllPopups=function(a){return a[AdfRichUIPeer._POPUP_LIST]};AdfRichUIPeer._removeTwinkleCallback=function(a){a=AdfAgent.AGENT.getElementById(a);null!=a&&(a.removeAttribute(AdfRichUIPeer._TWINKLE_TIMER_ID_ATTR),AdfDomUtils.removeCSSClassName(a,AdfRichUIPeer._TWINKLE_ON_STYLECLASS))};
AdfRichUIPeer.prototype._popupClosedHandler=function(a){var b=a.component,c=b[AdfRichUIPeer._POPUP_LIST];if(null!=c&&c[a.popupId]){var d=a.contentDom,e=a.popupId;delete c[e];page.__removePopupInfo(b,e);a.unmap&&AdfPage.PAGE.unmapComponent(d.id);this.bind(b);this.PopupClosed(b,d,e);(b=a.otherClosedHandler)&&b(a.otherClosedHandlerParams)}};AdfRichUIPeer.prototype.PopupClosed=function(a,b,c){};AdfRichUIPeer.prototype.GetRichResourceURL=function(a){return AdfPage.PAGE.getResourceURL("/afr"+a)};
AdfRichUIPeer.prototype.scrollIntoView=function(a,b,c){this.bind(a);this.ScrollIntoView(a,b,c)};AdfRichUIPeer.prototype.ScrollIntoView=function(a,b,c){var d=this.getDomElement();d.scrollIntoView();var e=null;null!=c&&((e=AdfAgent.AGENT.getElementById(AdfRichUIPeer.CreateSubId(a.getClientId(),c)))?e.scrollIntoView():AdfLogger.LOGGER.warning("Invalid subTargetId specified:"+c));b&&(e?AdfFocusUtils.focusElement(e):(a=AdfFocusUtils.getFirstTabStop(d))&&AdfFocusUtils.focusElement(a))};
AdfRichUIPeer.prototype.getSubIdDomElement=function(a,b){this.bind(a);return this.GetSubIdDomElement(b)};AdfRichUIPeer.prototype.GetSubIdDomElement=function(a){AdfLogger.LOGGER.warning("Unknown subId:",a," for component ",this.getComponent());return null};AdfRichUIPeer.prototype.getFallbackDomElement=function(a,b,c){this.bind(a);return this.GetFallbackDomElement(b,c)};AdfRichUIPeer.prototype.GetFallbackDomElement=function(a,b){return null};
AdfRichUIPeer.prototype.simulateMouse=function(a,b,c){this.bind(a);var d;if(b){if(d=this.GetSubIdDomElement(b),!d){AdfLogger.LOGGER.warning("No DOM element found for provided subId: "+b+". Mouse event will not be processed.");return}}else d=this.getDomElement();this.SimulateMouseOnDescendant(a,d,c)};
AdfRichUIPeer.prototype.SimulateMouseOnDescendant=function(a,b,c){var d=this.getComponent().getParent();if(d){var e=d.getPeer();e.bind(d);e.SimulateMouseOnDescendant(a,b,c)}else b.scrollIntoView(),AdfPage.PAGE.simulateDomMouse(b,c)};AdfRichUIPeer.prototype.isAbsoluteLocatorCacheable=function(){return!0};AdfRichUIPeer.DISABLED_STYLECLASS="p_AFDisabled";AdfRichUIPeer.SELECTED_STYLECLASS="p_AFSelected";AdfRichUIPeer.READONLY_STYLECLASS="p_AFReadOnly";AdfRichUIPeer.DROP_TARGET_STYLECLASS="p_AFDropTarget";
AdfRichUIPeer.DRAG_SOURCE_STYLECLASS="p_AFDragSource";AdfRichUIPeer.BUSY_STYLECLASS="p_AFBusy";AdfRichUIPeer.HOVER_TARGET_STYLECLASS="p_AFHoverTarget";AdfRichUIPeer.FOCUS_TARGET_STYLECLASS="p_AFFocusTarget";AdfRichUIPeer.DRAG_READY_STYLECLASS="p_AFDragReady";AdfRichUIPeer.__TYPE_ATTR="__adfPeerMsgType";AdfRichUIPeer._POPUP_ID_DEFAULT="__afrPeerPPDefault";AdfRichUIPeer._POPUP_LIST="__afrPeerPPList";AdfRichUIPeer._TWINKLE_TIMER_ID_ATTR="__afrTwinkleTimer";AdfRichUIPeer._TWINKLE_ON_STYLECLASS="p_AFTwinkleOn";
AdfRichUIPeer._FILTER_PREFIX="_afrFltr";