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 2010/11/28 20:33:37 UTC

[jira] Resolved: (WICKET-3203) markup/html/form Choice classes List-based, add array-based version

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

Igor Vaynberg resolved WICKET-3203.
-----------------------------------

    Resolution: Won't Fix
      Assignee: Igor Vaynberg

its a one liner to convert an array to a List, i dont see why we need to add another 20 constructors all over the place to accept arrays. i think the in-memory overhead is trivial, and when serialized they take the same amount of space because jdk lists override serialization and optimize it.

> markup/html/form Choice classes List-based, add array-based version
> -------------------------------------------------------------------
>
>                 Key: WICKET-3203
>                 URL: https://issues.apache.org/jira/browse/WICKET-3203
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5-M3
>         Environment: all
>            Reporter: Richard Emberson
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> Looking at the Choice classes under org/apache/wicket/markup/html/form
> it occurred to me that there could be parallel versions that
> are Array-base mirroring the current ArrayList-based classes.
> List based Choice classes:
>  AbstractChoice.scala               
>  AbstractSingleSelectChoice.scala   
>  CheckBoxMultipleChoice.scala       
>  DropDownChoice.scala
>  ListChoice.scala
>  ListMultipleChoice.scala
>  RadioChoice.scala
> Array based Choice classes:
>  AbstractArrayChoice.scala
>  AbstractSingleSelectArrayChoice.scala
>  CheckBoxMultipleArrayChoice.scala
>  DropDownArrayChoice.scala
>  ListArrayChoice.scala
>  ListMultipleArrayChoice.scala
>  RadioArrayChoice.scala
> For those times when one needs to dynamically change the size
> of the data-container, Lists are easier than Arrays, but most
> of the time the number of elements in a DropDown is
> constant for the life of the application and an Array
> takes less memory than a List and access is faster (granted,
> neither of these is by very much).
> There would also have to be an ArrayModel class and a
> toArray method in the Model class.

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