var $AdfDhtmlCommandLinkPeer$$ = $AdfRichUIPeer$$.$createPeerClass$($AdfRichUIPeer$$, "AdfDhtmlCommandLinkPeer");
$goog$exportSymbol$$("AdfDhtmlCommandLinkPeer", $AdfDhtmlCommandLinkPeer$$);
$AdfDhtmlCommandLinkPeer$$.$InitSubclass$ = function $$AdfDhtmlCommandLinkPeer$$$$InitSubclass$$() {
  $AdfObject$$.$ensureClassInitialization$(AdfRichCommandLink);
  $AdfRichUIPeer$$.$addComponentEventHandlers$(this, $AdfUIInputEvent$$.$CLICK_EVENT_TYPE$);
  $AdfRichUIPeer$$.$addComponentPropertyGetters$(this, AdfRichCommandLink.TEXT);
  $AdfRichUIPeer$$.$addComponentPropertyChanges$(this, AdfRichCommandLink.TEXT);
  this.$_COMMAND_LINK_CONTEXT_KEY$ = "_adfClc";
  this.$_BUSY$ = "_busy";
  this.$_EXPANDO_TEXT_LENGTH$ = "data-afr-tlen";
};
$goog$exportSymbol$$("AdfDhtmlCommandLinkPeer.InitSubclass", $AdfDhtmlCommandLinkPeer$$.$InitSubclass$);
$AdfDhtmlCommandLinkPeer$$.prototype.$HandleComponentClick$ = function $$AdfDhtmlCommandLinkPeer$$$$$HandleComponentClick$$($componentEvent$$157$$) {
  var $component$$958_shouldProcess$$ = !0;
  if ($componentEvent$$157$$.$getEventPhase$() != $AdfBaseEvent$$.$AT_TARGET_PHASE$) {
    var $event$$186_eventTarget$$55_isBusy$$9$$ = $componentEvent$$157$$.$getNativeEventTarget$();
    $AdfDomUtils$$.$getParentWithAttr$(this.$getDomElement$(), $event$$186_eventTarget$$55_isBusy$$9$$, $AdfDhtmlCommandLinkPeer$$.$_COMMAND_LINK_CONTEXT_KEY$) && ($component$$958_shouldProcess$$ = !1);
  }
  if ($component$$958_shouldProcess$$) {
    $component$$958_shouldProcess$$ = this.$getComponent$();
    $event$$186_eventTarget$$55_isBusy$$9$$ = $component$$958_shouldProcess$$.$getProperty$($AdfDhtmlCommandLinkPeer$$.$_BUSY$);
    if ($componentEvent$$157$$.$isLeftButtonPressed$() && !$component$$958_shouldProcess$$.getDisabled() && !$event$$186_eventTarget$$55_isBusy$$9$$) {
      var $event$$186_eventTarget$$55_isBusy$$9$$ = new $AdfActionEvent$$($component$$958_shouldProcess$$), $params$$33$$ = $component$$958_shouldProcess$$.$getProperty$("_F_PARAMS");
      $params$$33$$ && $AdfDhtmlPage$$.$__addServerParamsToEvent$($event$$186_eventTarget$$55_isBusy$$9$$, $params$$33$$);
      $event$$186_eventTarget$$55_isBusy$$9$$.$queue$($component$$958_shouldProcess$$.getPartialSubmit());
    }
    $componentEvent$$157$$.cancel();
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandLinkPeer.prototype.HandleComponentClick", {$HandleComponentClick$:$AdfDhtmlCommandLinkPeer$$.prototype.$HandleComponentClick$});
$AdfDhtmlCommandLinkPeer$$.prototype.$GetAccessibleName$ = function $$AdfDhtmlCommandLinkPeer$$$$$GetAccessibleName$$() {
  return this.$getComponent$().getText();
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandLinkPeer.prototype.GetAccessibleName", {$GetAccessibleName$:$AdfDhtmlCommandLinkPeer$$.prototype.$GetAccessibleName$});
$AdfDhtmlCommandLinkPeer$$.prototype.$GetComponentText$ = function $$AdfDhtmlCommandLinkPeer$$$$$GetComponentText$$($component$$960$$, $domElement$$136$$) {
  "SPAN" == $domElement$$136$$.tagName && ($domElement$$136$$ = $AdfDomUtils$$.$getChildElementByPosition$($domElement$$136$$, 1, 1));
  if ($domElement$$136$$) {
    $AdfAssert$$.assert("A" == $domElement$$136$$.tagName, "Anchor element is expected root of link component");
    var $textLength$$2$$ = $domElement$$136$$.getAttribute($AdfDhtmlCommandLinkPeer$$.$_EXPANDO_TEXT_LENGTH$);
    return null == $textLength$$2$$ ? null : 0 == $textLength$$2$$ ? "" : $AdfAgent$$.$AGENT$.$getTextContent$($domElement$$136$$).slice(0, $textLength$$2$$);
  }
  $AdfAssert$$.assert(!1, "Unable to find the element containing the text");
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandLinkPeer.prototype.GetComponentText", {$GetComponentText$:$AdfDhtmlCommandLinkPeer$$.prototype.$GetComponentText$});
$AdfDhtmlCommandLinkPeer$$.prototype.$GetInlineEditor$ = function $$AdfDhtmlCommandLinkPeer$$$$$GetInlineEditor$$() {
  return $AdfDhtmlSimpleTextEditor$$.$getInlineEditor$();
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandLinkPeer.prototype.GetInlineEditor", {$GetInlineEditor$:$AdfDhtmlCommandLinkPeer$$.prototype.$GetInlineEditor$});
$AdfDhtmlCommandLinkPeer$$.prototype.$ComponentTextChanged$ = $AdfDomUtils$$.$__componentTextChanged$;
$AdfDhtmlCommandLinkPeer$$.prototype.$SetBusy$ = function $$AdfDhtmlCommandLinkPeer$$$$$SetBusy$$($isBusy$$10$$) {
  var $component$$961$$ = this.$getComponent$(), $domElement$$137$$ = this.$getDomElement$(), $actionForm$$3_isMultipart$$ = $AdfDomUtils$$.$getFormElement$($domElement$$137$$);
  $actionForm$$3_isMultipart$$ && ($actionForm$$3_isMultipart$$ = $AdfDomUtils$$.$isMultiPartForm$($actionForm$$3_isMultipart$$), $component$$961$$.getDisabled() || $actionForm$$3_isMultipart$$ || $AdfPage$$.$PAGE$.$isAttachmentMode$() || ($AdfDomUtils$$.$addOrRemoveCSSClassName$($isBusy$$10$$, $domElement$$137$$, $AdfRichUIPeer$$.$DISABLED_STYLECLASS$), $AdfAgent$$.$AGENT$.setCursor($domElement$$137$$, $isBusy$$10$$ ? "wait" : "auto"), $component$$961$$.setProperty($AdfDhtmlCommandLinkPeer$$.$_BUSY$, 
  $isBusy$$10$$, !1, $AdfUIComponent$$.$PROPAGATE_NEVER$)));
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandLinkPeer.prototype.SetBusy", {$SetBusy$:$AdfDhtmlCommandLinkPeer$$.prototype.$SetBusy$});
$AdfDhtmlCommandLinkPeer$$.prototype.$isBusy$ = function $$AdfDhtmlCommandLinkPeer$$$$$isBusy$$() {
  var $component$$962$$ = this.$getComponent$();
  return $component$$962$$ && $component$$962$$.$getProperty$($AdfDhtmlCommandLinkPeer$$.$_BUSY$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlCommandLinkPeer.prototype.isBusy", {$isBusy$:$AdfDhtmlCommandLinkPeer$$.prototype.$isBusy$});
