}
}
protected void validatePage(Object command, Errors errors, int page) {
OrderForm orderForm = (OrderForm) command;
OrderValidator orderValidator = (OrderValidator) getValidator();
errors.setNestedPath("order");
switch (page) {
case 0:
orderValidator.validateCreditCard(orderForm.getOrder(), errors);
orderValidator.validateBillingAddress(orderForm.getOrder(), errors);
break;
case 1:
orderValidator.validateShippingAddress(orderForm.getOrder(), errors);
}
errors.setNestedPath("");
}