The "JSFish" way to do this is to create a converter:
public Object getAsObject(FacesContext context, UIComponent comp, String param) {
return (param.equals("0")) ? null : param;
}
public String getAsString(FacesContext context, UIComponent comp, Object obj) {
return (obj == null) ? "0" : obj.toString();
}