Pessoal,
tenho um formulário e quero que os campos que estão no painelGridInputs sejam completados automaticamente usando a4j:support.
Tentei criar o código, mas não funcionou:<a4j:support event="onselect" action="#{pessoaFisicaFace.load}" reRender="panelGridInputs">
<f:setPropertyActionListener value="#{fisica.id}" target="#{pessoaFisicaFace.selectedId}" />
</a4j:support>
WARN - Target component for id panelGridInputs not foundSegue o código relevante:
<fieldset><legend>Pesquisa</legend>
<h:panelGrid columns="2">
<rich:panel>
<h:outputLabel for="nome" value="Digite o nome: " styleClass="rotulos" />
<a4j:region immediate="true" renderRegionOnly="true">
<h:inputText id="text" value="#{pessoaFisicaFace.pessoaFisica.nome}" label="Nome " styleClass="rotulos" style=" width : 321px;" />
<rich:suggestionbox ajaxSingle="true" height="150" width="150" for="text" id="sugbox" suggestionAction="#{pessoaFisicaFace.autocomplete}" var="fisica">
<h:column>
<h:outputText value="#{fisica.nome}" />
</h:column>
<a4j:support event="onselect" action="#{pessoaFisicaFace.load}" reRender="panelGridInputs">
<f:setPropertyActionListener value="#{fisica.id}" target="#{pessoaFisicaFace.selectedId}" />
</a4j:support>
</rich:suggestionbox>
</a4j:region>
<!-- botoes -->
<h:commandButton value="Pesquisar" action="#{pessoaFisicaFace.load}" styleClass="botoes" />
<h:commandButton value="Voltar" action="goIndex" styleClass="botoes" />
<h:commandButton value="Limpar" action="#{pessoaFisicaFace.clean}" styleClass="botoes" />
<f:verbatim><br/></f:verbatim>
<f:verbatim><br/></f:verbatim>
<!-- panelGrid -->
<h:panelGrid columns="2" id="painelGridInputs">
<h:outputLabel for="nome_" value="Nome " styleClass="rotulos" />
<h:inputText id="nome_" value="#{pessoaFisicaFace.pessoaFisica.nome}" styleClass="edit" />
<h:outputLabel for="email_" value="E-mail " styleClass="rotulos" />
<h:inputText id="email_" value="#{pessoaFisicaFace.pessoaFisica.email}" styleClass="edit" />
<h:outputLabel for="cpf_" value="CPF " styleClass="rotulos" />
<h:inputText id="cpf_" value="#{pessoaFisicaFace.pessoaFisica.cpf}" styleClass="edit" />
... muitos campos...
</h:panelGrid>
<!-- -->
<f:verbatim><br /></f:verbatim>
<f:verbatim><br /></f:verbatim>
</rich:panel>
</h:panelGrid>
</fieldset>
</h:form>
</f:view>
</body>
</html>
</jsp:root>