You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2011/02/17 08:35:24 UTC
[jira] Resolved: (WICKET-3439)
org.apache.wicket.markup.html.form.AbstractChoice renderer cast in method
appendOptionHtml
[ https://issues.apache.org/jira/browse/WICKET-3439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg resolved WICKET-3439.
-----------------------------------
Resolution: Fixed
Fix Version/s: 1.5-RC2
Assignee: Igor Vaynberg
CheckBoxMultipleChoice had the most correct implementation.
the renderer can really return Object of class that is not tied to any type parameters of the choice component. it is wicket's job then to take this Object and convert it into its String representation using a converter. the getConverter() method is also not tied to the parameter type of the choice component, and so should not be iconverter<t> but rather raw converter since we do not know at compile time which one it will actually be.
> org.apache.wicket.markup.html.form.AbstractChoice renderer cast in method appendOptionHtml
> ------------------------------------------------------------------------------------------
>
> Key: WICKET-3439
> URL: https://issues.apache.org/jira/browse/WICKET-3439
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5-RC1
> Environment: all
> Reporter: Richard Emberson
> Assignee: Igor Vaynberg
> Priority: Minor
> Fix For: 1.5-RC2
>
>
> In class org.apache.wicket.markup.html.form.AbstractChoice<T, E> the renderer instance
> variable has signature:
> private IChoiceRenderer<? super E> renderer;
> In the method appendOptionHtml the renderer's getDisplayValue method is called as follows:
> T objectValue = (T)renderer.getDisplayValue(choice);
> where the signature for the IChoiceRenderer<E> getDisplayValue method is:
> Object getDisplayValue(E object);
> So, is it a fact that for all usages of AbstractChoice that the display value returned by a
> renderer of type E will always be of type T (not Object)??? If not, then one should expect cast
> exceptions.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira