ok, problem solved by creating the following class and registering it with initBinder
Code:
import org.springframework.beans.propertyeditors.CustomNumberEditor;
import org.springframework.util.NumberUtils;
import org.springframework.util.StringUtils;
public class LongAllowsBlanksEditor extends CustomNumberEditor
{
public LongAllowsBlanksEditor()
{
super(Long.class, true);
}
/**
* Parse the Number from the given text, using the specified NumberFormat.
*/
public void setAsText(String text) throws IllegalArgumentException
{
super.setAsText(text);
if(getValue()==null)
{
setValue(new Long(0));
}
}
}