> public class DevicePartMeasurementTO implements Serializable {
>
>
>
> private int devicePartsTypeID;
>
> private String devicePartsType;
>
> private float prWave;
>
> private float impedance;
>
> private String threshold;
>
>
>
> public DevicePartMeasurementTO()
>
> {
>
>
>
> }
>
> ....getters and setters
>
>
I think the behaviour that you are seeing is because the ConvertUtils uses
default values when it cannot convert the strings that come in the request
to the corresponding bean properties. So, once the validator gets to see the
properties to validate they are initialized to their corresponding primitive
defaults (0.0f etc) and so the validation is successful.

You could just use Strings as all your properties or have a new bean (a
LazyDynaBean for eg) referenced from your form like so

<form-property name="deviceMsmnts" type="
org.apache.commons.beanutils.LazyDynaBean[]"/>

and using BeanUtils.copyProperties() you could convert each LazyDynaBean
individually to the corresponding DTO in the action class before business
processing.

Reply via email to