Hi,
I have an AutoCompleteTextField, for which I need to react to user
selections from the choices list. For example, if a user enters "Au"
and the choices "Austria" and "Australia" are shown, I need to be able
to execute some code via a callback if the user scrolls down to one of
the two choices and presses enter on one of them.
Is there some behavior I can add, or callback method I can override to
react to user selection?
Reading back, I need to clarify something: what I need is to be able to
access the model object that was selected by the user, Not just the
textual representation created by the IAutoCompleteRenderer, but the
actual object instance that produced it.
To elaborate:
1) I have an AutoCompleteTextField<SomeClass>
2) It presents a list of choices using an Iterator<SomeClass>
getChoices(String input)
3) An IAutoCompleteRenderer<SomeClass> provides the textual
representation for the choices
4) When the user selects a choice, I need to react knowing the
SomeClass object instance that was chosen
Due to (4), a simple AjaxFormComponentUpdatingBehavior("onchange") does
not suffice: I only know the text that was provided by (3) and not the
actual object instance of type "SomeClass" that generated it.
How would I go about doing that?
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]