@SuppressWarnings("unchecked")
  @Override
  public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
    // The tr:commandLink is not a rendersChildren component,
    // but h:commandLink is.  Hence, the difference in behavior
    Renderer renderer = createRenderer(component);
    renderer.encodeBegin(context, component);

    for (UIComponent child : (List<UIComponent>) component.getChildren()) {
      RenderUtils.encodeRecursive(context, child);
    }

    renderer.encodeEnd(context, component);
  }