File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

extends StrutsTypeConverter for java.lang.Boolean

Keeno Banks
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • 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.

I agree. Here's the link:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic