Darn it, "Steve on Sakai"! ;)  Glad to help!

On Wed, May 6, 2009 at 2:38 PM, Phillip Rhodes
<spamsu...@rhoderunner.com> wrote:
> Thanks for the solution.
> I found this post here (so the reader is getting off easy:)
>
> http://steve-on-sakai.blogspot.com/2008/12/using-hashmap-with-dropdownchoice.html
>
>
> -----Original Message-----
> From: "James Carman" <jcar...@carmanconsulting.com>
> Sent: Tuesday, May 5, 2009 12:55pm
> To: users@wicket.apache.org
> Subject: Re: DropDownChoice with ChoiceRender problem
>
> On Tue, May 5, 2009 at 9:37 AM, Phillip Rhodes
> <spamsu...@rhoderunner.com> wrote:
>> I want to display "Yes" to the user in the dropdown.  If the user selects 
>> "Yes", I want address.handicapAccess string property to be set to "Y"
>>
>> Do you still think a map-based rendererer is the way to go?
>
> Yes, I would do it that way.  That seems easiest to me.  I do that
> stuff sometimes and I declare my map to be static:
>
> private static Map<String,String> CHOICES_MAP = new HashMap<String,String>();
> static
> {
>  CHOICES_MAP.put("Y", "Yes");
>  CHOICES_MAP.put("N", "No");
>  CHOICES_MAP.put("U", "Unknown");
> }
>
> Then, just use your map in your renderer (I'll leave that exercise up
> to the reader).  You could even use resource keys instead of
> hard-coded labels.  That way, the "Yes" stuff would be in properties
> files.  Enjoy!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to