> I admit the EnumDropDownChoice is more of a convenient class that a
> real new feature.

It's simply an overkill for the purpose. I loved the idea of a
TypeChoiceModel, though. Maybe it should also be tuned to be non
enum-specific, like the TypeChoiceRenderer.

> A standalone EnumChoiceRenderer would need to take a Component as a
> constructor parameter, to call getString() on,

This is not true. Localizer is available everywhere.

Application.get().getResourceSettings().getLocalizer();


**
Martin
>
>
>
>
> On Wed, Nov 11, 2009 at 7:58 PM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
>> I vote for EnumChoiceRender instead of full DropDownChoice.
>>
>> However. EnumChoiceRenderer can render any TYPE so that's why I have
>> proposed TypeChoiceRenderer. You can directly use it with existing
>> wicket and no need for specific dropdown.
>>
>> **
>> Martin
>>
>> 2009/11/11 Olivier Croisier <olivier.crois...@gmail.com>:
>> > Hi,
>> >
>> > I just submitted a patch to the very old
>> > WICKET-1157<https://issues.apache.org/jira/browse/WICKET-1157>JIRA (no
>> > activity for the last 2 years).
>> > It provides a simple and flexible way to internationalize enums :
>> > - An EnumMessageKeyProvided that implements a Strategy pattern to
>> generate
>> > I18N keys from enums.
>> > - An EnumDropDownChoice to render HTML <select> components
>> > - An EnumModel to internationalize any enum provided by another Model (so
>> > there is no need of EnumLabels and such).
>> >
>> > Hope that helps,
>> >
>> > Olivier
>> >
>>
>

Reply via email to