TIP: Ajax Refresh on an Autocomplete-powered Input Widget

If you are using the RichWidgets’ Input Autocomplete pattern to provide dropdown suggestions for one of your Input Widgets and you want to do an Ajax Refresh on that Input, you will need to make sure you also refresh the associated Input_Autocomplete Web Block.

Due to the way the Autocomplete pattern is implemented, the pattern’s Web Block needs to re-bind with the new, refreshed, Input HTML element. This means that if you don’t refresh the Block as well as the Input, the later loses the Autocomplete functionality upon an Ajax Refresh.

The suggested procedure is to include both the Input and its Input_Autocomplete Web Block inside a Container Widget, name that container, and then do the Ajax Refresh on that instead (thus refreshing both widgets inside).