docs: public static FormInfo findNestingForm(UIComponent uiComponent,
              FacesContext facesContext)
      {
          UIComponent parent = uiComponent.getParent();
          while (parent != null
                  && (!ADF_FORM_COMPONENT_FAMILY.equals(parent.getFamily())
                          && !TRINIDAD_FORM_COMPONENT_FAMILY.equals(parent
                                  .getFamily()) && !(parent instanceof UIForm)))
          {
              parent = parent.getParent();
          }
  
          if (parent != null)
          {
              //link is nested inside a form
              String formName = parent.getClientId(facesContext);
              return new FormInfo(parent, formName);
          }
  
          return null;
      }