Recaptcha does not render

I'm trying to put a recaptcha in my view, but it doesn't render at all and the following exception appears:

Warning: JSF1090: unresolved navigation case for the j_idt200 component.

View

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets">

    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />    
        <script src='https://www.google.com/recaptcha/api.js?hl=pt-BR'></script>
    </h:head>

    <h:body>

            <p:layoutUnit id="centerLayoutUnit" position="center" style="top: 70px;">
                <h:form id="centerForm" >
                    <p:messages id="mensagens" autoUpdate="true" closable="true"/>

                    <p:outputPanel id="cadastro">
                        <p:outputPanel rendered="#{registroOnlineEmpresaController.renderizaCadastro}">
                            <p:wizard id="wizardForm" widgetVar="wizardForm" backLabel="Voltar" nextLabel="Próximo" showStepStatus="false"
                                      binding="#{registroOnlineEmpresaController.wizardForm}" showNavBar="false">

    <!-- PARTE OCULTADA -->

                                <p:tab id="tabAnexoArquivos" title="Confirmação e Envio de Documentos">
                                    <p:panel id="anexoArquivos" header="Confirmação e Envio de Documentos">
                                        <h:outputText value="AVISO: Será enviada uma mensagem no email cadastrado 
                                                  com data de agendamento para apresentação dos documentos originais" 
                                                  style="color: #f00; font-weight: bold;"/>

                                        <br />
                                        <br />

                                        <fieldset>
                                            <legend>
                                                <h:outputLabel value="Anexar Arquivos" style="font-weight: bold"/>
                                            </legend>

                                            <p:outputPanel id="tipoDocumento">
                                                <p:outputPanel rendered="#{registroOnlineEmpresaController.tipoProtocoloSelecionado != null}">
                                                    <ul>
                                                        <ui:repeat value="#{registroOnlineEmpresaController.obterTiposDocumentosObrigatorios()}" var="itemTipoDocumento">
                                                            <li>
                                                                <p:commandLink value="#{itemTipoDocumento.descricao}" actionListener="#{registroOnlineEmpresaController.abrirAnexosTiposDocumentosObrigatorios(itemTipoDocumento)}"
                                                                    immediate="true" update="@([id$=tipoDocumento], [id$=panelTiposDocumentos])" title="Clique para anexar arquivos"/>
                                                            </li>

                                                            <ui:repeat value="#{registroOnlineEmpresaController.recuperarArquivosAnexados(itemTipoDocumento)}"
                                                                       var="itemArquivoAnexado">

                                                                <li style="margin-left: 20px;">
                                                                    <h:outputText value="#{itemArquivoAnexado.nomeArquivo}" style="margin-right: 1px;"/>
                                                                    <p:commandLink actionListener="#{registroOnlineEmpresaController.excluirAnexo(itemArquivoAnexado)}"
                                                                    style="margin-right: 3px;" immediate="true" update="@([id$=tipoDocumento])">
                                                                        <p:graphicImage alt="Excluir" value="../imagens/site/delete.png" />
                                                                    </p:commandLink>
                                                                </li>

                                                            </ui:repeat>
                                                        </ui:repeat>
                                                    </ul>

                                                    <br />
                                                    <br />

                                                    <p:outputPanel rendered="#{registroOnlineEmpresaController.renderizaMenuTodosOsTiposDocumentos}">
                                                        <h:outputLabel value="Tipo de Documento *: " style="font-weight: bold" />
                                                        <h:selectOneMenu id="tiposDocumentos" style="height: 20px; width: 200px; background-color: #fff;"
                                                                         converter="tipoDocumentoRegistroOnlineEmpresaConverter"
                                                                         required="true" requiredMessage="Tipo de Documento: Preenchimento Obrigatório"
                                                                         validator="#{registroOnlineEmpresaController.validatorTeste}"
                                                                         validatorMessage="Tipo de Documento Inválido">
                                                            <f:selectItem noSelectionOption="true" itemLabel="Selecione..." />
                                                            <f:selectItems value="#{tipoDocumentoController.tiposDocumentos}"
                                                                           var="tipoDocumento" itemValue="#{itemTipoDocumento}" itemLabel="#{tipoDocumento.descricao}" />
                                                            <p:ajax event="change" process="@this" />

                                                        </h:selectOneMenu>
                                                    </p:outputPanel>

                                                    <br />

                                                    <p:outputPanel style="width: 300px;" rendered="#{registroOnlineEmpresaController.renderizaFileUpload}">
                                                        <h:outputLabel value="Anexo de Arquivos *:" style="font-weight: bold" />

                                                        <br />
                                                        <br />

                                                        <p:fileUpload id="uploadAnexo"
                                                                      fileUploadListener="#{registroOnlineEmpresaController.handleFileUpload}"
                                                                      allowTypes="/(\.|\/)(gif|png|jpe?g|pdf)$/"
                                                                      sizeLimit="10000000"
                                                                      label="Escolher..."
                                                                      multiple="true"
                                                                      auto="true"
                                                                      showButtons="false"
                                                                      mode="advanced"
                                                                      uploadLabel="Enviar Arquivos"
                                                                      process="@this"
                                                                      dragDropSupport="true"
                                                                      required="true"
                                                                      invalidFileMessage="Arquivo Inválido! Anexe apenas imagem e/ou PDFs"
                                                                      invalidSizeMessage="Tamanho inválido! Tamanho máximo 10MB"
                                                                      requiredMessage="Anexe pelo menos um arquivo"
                                                                      update="tipoDocumento"/>

                                                        <br />
                                                        <br />

                                                        <p:commandButton icon="voltar" value="Voltar" update="tipoDocumento" immediate="true"
                                                                         actionListener="#{registroOnlineEmpresaController.voltarAnexo()}"/>
                                                    </p:outputPanel>
                                                </p:outputPanel>
                                            </p:outputPanel>

                                        </fieldset>

                                        <br />
                                        <br />

                                        <h:selectBooleanCheckbox value="#{registroOnlineEmpresaController.aceitacaoTermos}"
                                                                 title="Aceito o Termo de Responsabilidade"
                                                                 validator="#{registroOnlineEmpresaController.validarAceitacaoTermos}"/>

                                        <h:outputLabel value="Aceito o " style="font-weight: bold"/>

                                        <h:link target="blank" outcome="termoResponsabilidadeEmpresa" value="Termo de Responsabilidade" 
                                                style="font-size: 11px; font-weight: bold;"/>

                                        <br />
                                        <br />

                                        <h:panelGrid style="text-align: left;margin-left: 10px;">
                                            <div class="g-recaptcha" data-sitekey="MY_KEY"></div> 
                                        </h:panelGrid>

                                        <br />
                                        <br />

                                        <p:commandButton icon="adicionar" value="Enviar Cadastro"
                                                         action="#{registroOnlineEmpresaController.gerarRegistro()}" />
                                    </p:panel>
                                </p:tab>
                            </p:wizard>

                            <p:outputPanel autoUpdate="true">
                                <p:commandButton value="Voltar" icon="voltar" immediate="true" actionListener="#{registroOnlineEmpresaController.onBack()}"
                                                 rendered="#{registroOnlineEmpresaController.renderizaBotaoVoltar}"/>
                                <p:commandButton value="Próximo" icon="proximo" actionListener="#{registroOnlineEmpresaController.onNext()}"
                                                 style="float: right" rendered="#{registroOnlineEmpresaController.renderizaBotaoProximo}"/>
                            </p:outputPanel>
                        </p:outputPanel>
                    </p:outputPanel>
                </h:form>
            </p:layoutUnit>

            <p:layoutUnit position="south" size="30" footer="© 2019 Todos os direitos reservados." resizable="false" closable="false" collapsible="false">
            </p:layoutUnit>
        </p:layout>
    </h:body>
</html>

Link to Stacktrace

Author: Juliana Marques, 2019-08-27

1 answers

Would put as a comment, but I don't have enough points...

A user of the International Version of StackOverFlow, was with the same problem "warning :JSF1090", follows the question link with the solution -> link.

According to the author of the answer with the solution:

" this warning will occur whenever you use an (implicit) navigation result in the outcome attribute of <h:link> or <h:button> , which does not represent a display ID valid."

" also, <h:link> renders an element <span> instead of an element <a>.

The solution is obvious: use a valid display ID or make sure that the desired display can be resolved by ConfigurableNavigationHandler#getNavigationCase().

Note that some beginners use, for an unknown reason, even a full URL like http://google.com as the result value of <h:link>:

<h:link value="Go to Google" outcome="http://google.com" /> 

This abuse would also produce exactly that warning. You should use <h:outputLink> or just <a> .

As for the absence of an HTML element with the same ID as the JSF component, this can happen when you have not explicitly specified the id attribute of the JSF component. The JSF component ID does not necessarily end in the generated HTML output. Assigning these components a fixed ID should better help in identifying the cause."

I hope I helped.

 1
Author: Pedro Paulo, 2019-09-01 12:37:44