AdfRichUIPeer.createPeerClass(AdfRichUIPeer,"AdfDhtmlFormPeer");AdfDhtmlFormPeer.InitSubclass=function(){AdfRichUIPeer.addSuppressedPPRAttributes(this,"defaultCommand");AdfRichUIPeer.addComponentEventHandlers(this,AdfUIInputEvent.KEY_PRESS_EVENT_TYPE)};AdfDhtmlFormPeer.prototype.DomReplaceNotify=function(a){var b=this.getComponent().getClientId(),b=AdfRichUIPeer.createSubId(b,"postscript");return a.id==b?null:a};
AdfDhtmlFormPeer.prototype.InitDomElement=function(a,b){AdfDhtmlFormPeer.superclass.InitDomElement.call(this,a,b);AdfPage.PAGE.getDomWindow()["_"+a.getClientId()+"Validator"]=function(){return!0}};
AdfDhtmlFormPeer.prototype.HandleComponentKeyPress=function(a){if(a.getKeyCode()==AdfKeyStroke.ENTER_KEY&&(a=AdfDhtmlFormPeer.__GetDefaultCommandTriggerId(a,!0),null!=a)){a=AdfDhtmlSubformPeer.getDefaultCommandSubform(a);var b;a||(a=this.getComponent());if(b=a.getDefaultCommand()){var d=a.findComponent(b);d?d.getPeer().isBusy()||AdfActionEvent.queue(d,d.getPartialSubmit()):AdfLogger.LOGGER.warning("DefaultCommand with the ID of '"+b+"' is not found for component: "+a)}}};
AdfDhtmlFormPeer.__GetDefaultCommandTriggerId=function(a,b){var d=a.getNativeEventTarget();if(d){var e=d.tagName;if("A"==e||"BUTTON"==e||"TEXTAREA"==e||"IFRAME"==e||"INPUT"==e&&("submit"==d.type||"reset"==d.type))return null;"SELECT"!=e&&b&&a.cancel();for(e=d.id;!e;)d=d.parentNode,e=d.id;return e}return null};