AutoCompleteTextField.getModelObject() needs the means to return an underlying
collection of POJOs.
----------------------------------------------------------------------------------------------------
Key: WICKET-1328
URL: https://issues.apache.org/jira/browse/WICKET-1328
Project: Wicket
Issue Type: New Feature
Components: wicket-extensions
Affects Versions: 1.3.0-final
Environment: Assigning an iterator of POJOs to AutoCompleteTextField
instead of Strings.
Reporter: Michael Mehrle
Priority: Minor
When assigning AutoCompleteTextField an iterator of POJOs instead of Strings
(via the overridden getChoices() method, which returns an Iterator),.
getModelObject() needs to be able to return POJO instances instead of the
Strings produced by the custom AutoCompleteTextRenderer.
This situation arose when I had to feed a list of POJOs into my
AutoCompleteTextfield - which worked fine after writing a simple subclass of
AbstractAutoCompleteTextRenderer, which grabbed the POJO's name field for
screen rendering (the list inside the <div> tag). Problem is that the call to
getModelObject *seems* to use the text from renderer.getTextValue(), which
required me to manually match that string to the name fields of the cached
POJOs. In a preferred scenario getModelObject() would return the object
references that were fed into getChoices().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.