Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-1982

Autocompleter should offer an allowCache parameter (currently caching is enabled by default with no way to disable it)


    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.1.5
    • Fix Version/s: 4.1.7
    • Component/s: Framework
    • Labels:


      The dojo component that underlies the Autocompleter component - Select - has an "allowCache" property, which is set to true by default.

      This means that even when working in "remote" mode, results are cached locally after they have been fetched for the first time. This can be a problem. Consider the following scenario:

      A registration form has a PropertySelection component for country of residence and an Autocompleter component for city of residence. As soon as a country is changed, the Autocompleter model is aynchronously altered so as to match cities only from the selected country. A user first selects country "UK" for example, and then types "lon" into the city field. Some suggestions of city names are then retrieved from the model. The user then changes the country (e.g. after realizing he chose the wrong country) and types the same string into the city field again. Unfortunately the model will not even be polled this time, since dojo chaches the results that were extracted the last time the same filter was used.

      The Autocompleter component should therefore offer an allowCache parameter that would be copied to the dojo.widget.Select.allowCache property on initialization.




            • Assignee:
              annorax I D
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: