AdfRichUIPeer.createPeerClass(AdfDhtmlImplicitPeer,"AdfDhtmlIteratorPeer");AdfDhtmlIteratorPeer.prototype._getFirstAncestorIterator=function(a){for(a=a.getParent();a&&!(a instanceof AdfRichIterator);)a=a.getParent();return a};AdfDhtmlIteratorPeer.prototype._ensureAbsoluteLocatorInitialization=function(a){var b=this._getFirstAncestorIterator(a);b&&b.getAbsoluteLocator();b=this._buildTokenToIndexMap(a);a.setProperty("_tokenMappings",b)};
AdfDhtmlIteratorPeer.prototype.getAbsoluteLocator=function(a,b){this._ensureAbsoluteLocatorInitialization(a);return AdfDhtmlIteratorPeer.superclass.getAbsoluteLocator.call(this,a,b)};AdfDhtmlIteratorPeer._getAncestorContentDomElement=function(a){var b;do{a=a.getParent();if(!a)break;var d=a.getPeer();d&&(b=d.getDomContentElement())}while(!b);return b};AdfDhtmlIteratorPeer._getIteratorToken=function(a,b){var d=a.id,e=b.length;if(d&&b===d.substring(0,e)){var f=d.indexOf(":",e);return d.substring(e,f)}return null};
AdfDhtmlIteratorPeer.prototype._buildTokenToIndexMap=function(a){var b=a.getClientId()+":";a=AdfDhtmlIteratorPeer._getAncestorContentDomElement(a);var d={},e=0,f=function(a){return(a=AdfDhtmlIteratorPeer._getIteratorToken(a,b))?(void 0==d[a]&&(d[a]=e++),NodeFilter.FILTER_REJECT):NodeFilter.FILTER_SKIP};f.acceptNode=f;if(a)for(a=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,f,!1);a.nextNode(););return d};
AdfDhtmlIteratorPeer.fixupIteratorAbsoluteLocator=function(a,b){var d=AdfPage.PAGE;do{var e=/[\:](\d+)[\:](.+)/.exec(a);if(e){var f=a.substring(0,a.length-e[0].length),g=d.findComponentByAbsoluteLocator(f);if(g instanceof AdfRichIterator){g.getAbsoluteLocator();var h=g.getProperty("_tokenMappings");if(null==h||1>Object.keys(h).length)break;var k=g.getFirst(),l=e[1],h=h[l];if(void 0===h)throw Error("Couldn't find index of token "+l+" on "+g);a=f+"["+(k+h)+"]:"+e[2]}else break}}while(e);return a};
AdfRichUIPeer.prototype.isAbsoluteLocatorCacheable=function(){return!1};