I have a health care application and I have the following question: When I use the p:autoComplete
component of PrimeFaces to search for the name of the patient that has the dataNascimento
attribute, I want the h:outputText
to receive the age coming from database.
<p:autoComplete id="nome"
value="#{cadastroPrimeiraConsultaBean.pessoa.nome}"
completeMethod="#{cadastroPrimeiraConsultaBean.porNome}"
var="pessoa" itemLabel="#{pessoa.nome}" itemValue="#{pessoa}"
forceSelection="true" dropdown="true" />
<p:outputLabel value="Data de Nascimento:" for="dataNascimento" />
<h:outputText value="cadastroPrimeiraConsultaBean.pessoa.dataNascimento id="dataNascimento"/>
Could you help me with how to solve this problem.