//i=1 because the first one is dummy value from prototype
for(int i=1;i<taxRateIds.length;i++){
int taxRateId = getConversionService().convert(taxRateIds[i], Integer.class);
String based = baseds[i];
int priority = getConversionService().convert(priorities[i], Integer.class);
TaxRule taxRule = new TaxRule();
taxRule.setTaxRateId(taxRateId);
taxRule.setBased(based);
taxRule.setPriority(priority);
taxClass.getTaxRules().add(taxRule);
}
}
if(result.hasErrors()){