public VisitResult visit()

in tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/CommandRendererBase.java [283:326]


    public VisitResult visit(VisitContext context, UIComponent target) {
      if (target.getClientId(facesContext).equals(clientId)) {
        return VisitResult.ACCEPT;
      } else if (target instanceof AbstractUIStyle) {
        if (renderLater == null) {
          renderLater = new ArrayList<>();
        }
        renderLater.add(target);
        return VisitResult.REJECT;
      } else if (target instanceof Visual && !((Visual) target).isPlain()
          || ComponentUtils.isStandardHtmlRendererType(target)) {
        if (!(target instanceof UIParameter) && !(target instanceof AbstractUIBadge)) {
          if (target instanceof AbstractUILink
              || target instanceof AbstractUISelectBooleanCheckbox
              || target instanceof AbstractUISelectBooleanToggle
              || target instanceof AbstractUISelectManyCheckbox
              || target instanceof AbstractUISelectOneRadio
              || target instanceof AbstractUISeparator) {
            insideBegin(facesContext, HtmlElements.COMMAND); // XXX may refactor / cleanup
            try {
              target.encodeAll(facesContext);
            } catch (IOException ioException) {
              throw new FacesException(ioException);
            }
            insideEnd(facesContext, HtmlElements.COMMAND);
            // XXX may refactor / cleanup
          } else if (UIComponent.isCompositeComponent(target)) {
            UIComponent facet = target.getFacet(UIComponent.COMPOSITE_FACET_NAME);
            return visit(context, facet);
          } else {
            try {
              writer.startElement(HtmlElements.DIV);
              writer.writeClassAttribute(BootstrapClass.DROPDOWN_ITEM);
              target.encodeAll(facesContext);
              writer.endElement(HtmlElements.DIV);
            } catch (IOException ioException) {
              throw new FacesException(ioException);
            }
          }
          return VisitResult.REJECT;
        }
      }
      return VisitResult.ACCEPT;
    }