Erik Strid created WICKET-7130:
----------------------------------
Summary: Query parameter for the autocomplete field keeps old
values when extra parameters are added
Key: WICKET-7130
URL: https://issues.apache.org/jira/browse/WICKET-7130
Project: Wicket
Issue Type: Bug
Components: wicket-extensions
Reporter: Erik Strid
Attachments: autocomplete-1.zip
When typing in a autocomplete text field, the query parameter accumulate old
values as you type, causing the parameter to grow with typed values for each
request. The parameter grows until you reload the component.
This results in a faulty subsequent calls to
{{AutoCompleteBehavior.getChoices(String)}} with only the first typed value.
The problem seems to be the {{attrs}} variable in
{{prepareAndExecuteAjaxUpdate}} function in {{{}wicket-autocomplete.js{}}}.
It seems like {{attrs}} is a shallow copy, so the {{pre/sh/ep}} members refer
back to the original fields in {{{}ajaxAttributes{}}}.
I have attached a quick start reproduces this problem in wicket 9.18.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)