Run search update on button

1

My search field updates a selectManyMenu whenever something is typed in it

<p:inputText id="txtFiltroOrgaoDestino" value="#{mBManifestacao.txtFiltroOrgaoDestino}" style="width: 350px">
    <p:ajax update="slcUnidadeTramite" event="keyup" global="false" listener="#{mBManifestacao.filtrarOrgaoDestino}" />
</p:inputText>

But when the field is released for editing it already comes with a text in it, and I would like it to filter at that time, as og I need to go in the field to select and give a space for example

I tried everything that is way I could imagine making the button that releases for editing to perform an update in the field, but without success

<p:commandButton
    update=":frmAdministrarManifestacao,
            :frmEncaminharManifestacao,
            :frmTramiteManifestacao"
    process="@this, btnAnalisarManifestacao"
    value="Analisar Manifestação" id="btnAnalisarManifestacao"
    action="#{mBManifestacao.gravaStatusManifestacao()}">
    <f:setPropertyActionListener
        value="#{mBEnum.codStatusManifestacaoEM_ANALISE}"
        target="#{mBManifestacao.manifestacao.stStatusManifestacao}" />
</p:commandButton>

Update:

I was able to improve the situation a little bit after trying, but I do not need to give the space anymore, just by selecting the field it already executes the filter now:

<p:inputText id="txtFiltroOrgaoDestino" value="#{mBManifestacao.txtFiltroOrgaoDestino}" style="width: 350px">
    <p:ajax update="slcUnidadeTramite" event="click" global="false" listener="#{mBManifestacao.filtrarOrgaoDestino}" />
    <p:ajax update="slcUnidadeTramite" event="keyup" global="false" listener="#{mBManifestacao.filtrarOrgaoDestino}" />
</p:inputText>
    
asked by anonymous 16.08.2017 / 21:44

0 answers