2 Replies Latest reply on Jun 8, 2016 8:15 AM by Glauber Lemos

    rich:autocomplete cleaning the inputbox

    Glauber Lemos Newbie

      Hello guys,

       

      I've just migrated from Richfaces 3.3.3 to 4.3.7 and I'm struggling with the autocomplete component as i need to clean the input text after the execution of a ajax call, but it never gets cleaned, here is my code:

       

      <h:form id="autocompleteUserForm">

        <rich:autocomplete id="impersonateduser-box"

        valueChangeListener="#{OrderForm.selectActingUser}"

        autocompleteMethod="#{OrderForm.autocompleteUser}"

        value="#{OrderForm.autocompleteUserSelection}"

        autofill="false" onbeforedomupdate="#{OrderForm.cleanUserAutocompleteSelection()}"

        fetchValue="#{user.id}" var="user" layout="table"

        style="text-align: left;" minChars="3">

        <rich:column>

        <h:outputText value="#{user}" />

        </rich:column>

        <rich:column>

        <h:outputText value="#{user.email}" />

        </rich:column>

        <rich:column>

        <h:outputText value="#{user.counterparty.code}" />

        </rich:column>

        <rich:column>

        <h:outputText value="#{user.counterparty.name}" />

        </rich:column>

        <a4j:ajax execute="@this" event="selectitem"

        render="orderFormMainPanel,orderFormMainSubPanel" />

        </rich:autocomplete>

        </h:form>