[ 
https://issues.apache.org/jira/browse/WICKET-348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Vaynberg resolved WICKET-348.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.0-beta2

i have factored out some stuff into convertChoiceIdToChoice that is 
overridable. overriding convertValue() directly would be cumbersome as you need 
to mess with string arrays, etc.

basically this is useful for a direct id->choice lookup because right now our 
ichoicerenderer does a linear O(n) search, and if you have 100+ entries it will 
get slow as you need to load each choice and then retrieve its id for 
comparison.

johan what do you think? any objections? it would be nice if this was part of 
ichoicerenderer, then we can put the linear lookup into choicerenderer 
implements ichoicerenderer.

> Propose removing 'final' modifier to AbstractSingleSelectChoice.convertValue()
> ------------------------------------------------------------------------------
>
>                 Key: WICKET-348
>                 URL: https://issues.apache.org/jira/browse/WICKET-348
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 2.0 branch (discontinued)
>            Reporter: Brian Topping
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.0-beta2
>
>
> While creating a subclass of DropDownChoice, I wanted to write a specialized 
> reverse mapping function that would allow the option value to be used as the 
> primary key for direct lookup of the object.  Unfortunately, 
> AbstractSingleSelectChoice.convertValue() is has a 'final' modifier.  (I'm 
> guessing this is an inside joke because it does a linear search... ;-))
> Any chance of removing the final modifier?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to