You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Patrick Petermair <pa...@openforce.com> on 2010/08/19 14:34:57 UTC
AutoCompleteTextField
Hi!
Is it possible to get the AutoCompleteTextField to return a list of all
available choices when the user presses the downward key?
I tried to return an iterator for the full list when the input of
getChoices(String input) is empty, but this only works when the user
presses the space key. When the user presses the downward key, nothing
happpens.
Thanks,
Patrick
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: AutoCompleteTextField
Posted by Patrick Petermair <pa...@openforce.com>.
Matthias Keller schrieb:
> Use:
> AutoCompleteSettings settings = new AutoCompleteSettings();
> settings.setShowListOnEmptyInput(true);
> settings.setShowListOnFocusGain(true);
> // and possibly other settings as needed
>
> And then specify those settings in the constructor..
Thanks!
Works like a charm.
I didn't even think about using AutoCompleteSettings...
Patrick
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: AutoCompleteTextField
Posted by Matthias Keller <ma...@ergon.ch>.
On 2010-08-19 15:00, Patrick Petermair wrote:
> armandoxxx schrieb:
>> You need to be able to select multiple items from autocomplete
>> dropdown list
>> with just DOWN key ???
>
> No, I want to select a single item - but out of a list of all the items.
> Take the example at:
> www.wicket-library.com/wicket-examples/ajax/autocomplete
>
> The user starts typing "a" and the AutoCompleteTextField suggests the
> values Algeria, Austria, Australia, etc.
> In my usecase, the user wants to press the down key and be presented
> with a list of all the countries so that he can navigate through them
> with the up & down keys.
>
> Let's say a user has 100 possible choices .. then it makes sense to
> type in the first few letters until he is down to probably 5 choices
> or so. But another user may have only 3 possible choices. For him it
> would be better to just use the down key right away and select the
> value he wants instead of having him type a letter first..
Wouldn't it be enough to just let the list show on focus and on empty input?
Use:
AutoCompleteSettings settings = new AutoCompleteSettings();
settings.setShowListOnEmptyInput(true);
settings.setShowListOnFocusGain(true);
// and possibly other settings as needed
And then specify those settings in the constructor..
Matt
Re: AutoCompleteTextField
Posted by armandoxxx <ar...@dropchop.com>.
I get it now !
try checking this !
http://wicket.apache.org/apidocs/1.4/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AutoCompleteSettings.html
Kind regards
Armando
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AutoCompleteTextField-tp2331099p2331152.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: AutoCompleteTextField
Posted by Patrick Petermair <pa...@openforce.com>.
armandoxxx schrieb:
> You need to be able to select multiple items from autocomplete dropdown list
> with just DOWN key ???
No, I want to select a single item - but out of a list of all the items.
Take the example at:
www.wicket-library.com/wicket-examples/ajax/autocomplete
The user starts typing "a" and the AutoCompleteTextField suggests the
values Algeria, Austria, Australia, etc.
In my usecase, the user wants to press the down key and be presented
with a list of all the countries so that he can navigate through them
with the up & down keys.
Let's say a user has 100 possible choices .. then it makes sense to type
in the first few letters until he is down to probably 5 choices or so.
But another user may have only 3 possible choices. For him it would be
better to just use the down key right away and select the value he wants
instead of having him type a letter first..
Cheers,
Patrick
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: AutoCompleteTextField
Posted by armandoxxx <ar...@dropchop.com>.
You need to be able to select multiple items from autocomplete dropdown list
with just DOWN key ???
why do you need this kind of behavior ?
King regards
Armando
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AutoCompleteTextField-tp2331099p2331117.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org