1 Reply Latest reply on Jan 5, 2012 5:40 AM by horowitzathome

    Autocomplete action it not called when deleting last character (Rich 4.X)

    horowitzathome

      When the last character in an autocomplete field is deleted (e.g. with backspace), the autocomplete action method is not called.

       

      Sample: autocomplete field is initially empty

      • Enter a -> action is called with “a”
      • Enter b -> action is called with “ab”
      • Backspace -> action is called with “a”
      • Backspace -> action is not called

       

      This behavior is different to Richfaces 3.X versions. There, when deleting the last character, the autocomplete action is also called (with an empty input).

       

      In my opinion it is very important that, when deleting the last character, the action is called too. Suppose you have some autocomplete fields which represent filter criteria for a DB query (like one for street and one for town). On every user input the autocomplete actions are called which result in a DB query, where street and town are taken into account in the WHERE clause. Now the problem is, that when a user deletes the last character for example for the town autocomplete field, this is not recognized by the bean. When then the user changes after that to the other autocomplete filed (in this sample to the street autocomplete field) then on every input the last character of the town field is also taken into account (which is at the web page not present because there it was already deleted), but the bean behind did not get the information that the in the meantime the town field is empty and the query always takes the one character of the town into account. Actually this is more or less exactly the problem I currently have.

        • 1. Re: Autocomplete action it not called when deleting last character (Rich 4.X)
          horowitzathome

          I would like to repost this issue and ask, if there is any chance that the AutoComplete method is also called when the last character is deleted (e.g. with backspace or delete key). I think that this would be a very simple change and would help to get rid of a lot of workarounds which in the end are all not that good as just calling AutoComplete with an empty string. In addition the behavior would be compatible to 3.x versions.

           

          Is it enough to post this issue in this forum, or should I open an issue for that?

           

          Best Regards,

          Georg