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" <[email protected]> Sent: Tuesday, May 5, 2009 12:55pm To: [email protected] Subject: Re: DropDownChoice with ChoiceRender problem On Tue, May 5, 2009 at 9:37 AM, Phillip Rhodes <[email protected]> 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: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
