[
https://issues.apache.org/jira/browse/WICKET-3?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Janne Hietamäki reassigned WICKET-3:
------------------------------------
Assignee: Janne Hietamäki
> listen for "selection changed" event at AutocompleteTextField
> --------------------------------------------------------------
>
> Key: WICKET-3
> URL: https://issues.apache.org/jira/browse/WICKET-3
> Project: Wicket
> Issue Type: New Feature
> Components: wicket-extensions
> Affects Versions: 1.2.2
> Reporter: Thomas Krause
> Assigned To: Janne Hietamäki
> Attachments: wicket-autocomplete.diff
>
>
> When using drop-down list you can listen to the onchange-Event (e.g. with a
> AjaxFormSubmitBehavior) in order to perform certain actions.
> This is not possible when using the AutocompleteTextField even if it is very
> like a drop-down list. Listening to onchange will activate you behavior at
> any keystroke and not only when the user selected one entry of the given list.
> As a "workaround" I changed the wicket-autocomplete.js in a way, that the
> AutocompleteTextField will fire the onload-Event whenever a selection was
> made. onload is no official event for a textfield in HTML so this is a kind
> of a hack. In addition, onload is fired when the RETURN was hit inside the
> textbox.
> I think the possibility to react on a selection by the user at an
> AutocompleteTextField would be desirable and enhances the things you can do
> with. E.g. I use AutocompleteTextField to display a list of matching
> dictionary-entries and if the user selects one of them I will load this one
> without additional interaction by the user. But since this is not really a
> very clean way of implementing this feature I'm in doubt wether this should
> really find it's way into a wicket release. Maybe there is already a way to
> listen to the mentioned event, but I didn't find it.
> diff of wicket-autocomplete.js:
> 63a64
> > obj.onload();
> 65c66,70
> < }
> ---
> > }
> > else
> > {
> > obj.onload();
> > }
> 200a206,207
> > var obj=wicketGet(elementId);
> > obj.onload();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.