• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

extends StrutsTypeConverter for java.lang.Boolean

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm looking for a Type Converter that extends StrutsTypeConverter for Boolean.

In convertFromString(Map context, String[] values, Class toClass)
I'd like it to return null when the value is "-1" and Boolean.TRUE and Boolean.FALSE

In convertToString(Map arg0, Object arg1)
I'd like it to return "-1" for null, "true", and "false"

I'd like this converter to work for a collection of Booleans as well. For example I may have 5 <select name='color'></select>. All 5 dropdowns have the same name.

If someone could help, I would appreciate it.

Thanks,
kcentral
 
What's wrong? Where are you going? Stop! Read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic