A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Murach's Java Servlets and JSP
this week in the
extends StrutsTypeConverter for java.lang.Boolean
Joined: Sep 30, 2013
Sep 30, 2013 17:07:03
I'm looking for a Type Converter that extends StrutsTypeConverter for Boolean.
In convertFromString(Map context,
 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.
It is sorta covered in the
JavaRanch Style Guide
subject: extends StrutsTypeConverter for java.lang.Boolean
date conversion problem
TypeConversion with Struts 2
Data conversion in Hibernate
How to get subclass objects in an arraylist?
ModelDriven/Hibernate validation issue
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014