p: autocomplete primefaces update

0

I have the following primefaces component:

<p:autoComplete widgetVar="instalacion_w" size="52" dropdown="true" id="instalacion" scrollHeight="300" maxResults="100" value="#{facturacionView.filters.instalacion}" completeMethod="#{facturacionView.getInstalacion}"
    var="item" itemLabel="#{item.value}" itemValue="#{item.key}" forceSelection="true" multiple="true" queryDelay="1000" cache="true" cacheTimeout="60000" emptyMessage="Ningun dato coincide">                         
    <p:ajax event="itemSelect"  listener="#{facturacionView.instalacionSelected}"  update="" onstart="PF('cargando').show()" oncomplete="PF('cargando').hide()" />
    <p:ajax event="itemUnselect" listener="#{facturacionView.instalacionSelected}" update="" onstart="PF('cargando').show()" oncomplete="PF('cargando').hide()" />
</p:autoComplete>

Imagine that the component is loaded with the following elements:

  

Text1; Text2; Text3; Text4

If the user selects for example Texto1 , by: <p:ajax event="itemSelect" listener="#{facturacionView.instalacionSelected}" I delete the selected object.

The problem is that this element is still seen in p: autoComplete, until completeMethod is called again.

Is there any way to force p:autoComplete to be updated?

PrimeFaces 6.1. Mojarra 2.2.

    
asked by nachfren 13.03.2018 в 14:16
source

1 answer

1

update indicates elements to be refreshed from the client.

<p:ajax event="itemSelect"  listener="#{facturacionView.instalacionSelected}"  update="@this" onstart="PF('cargando').show()" oncomplete="PF('cargando').hide()" />
    
answered by 13.03.2018 / 15:10
source