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]

Reply via email to