ActionErrors actionerrors = new ActionErrors();
Ch10_06 orderForm = (Ch10_06)form;
String email = orderForm.getEmail();
if(email.trim().equals("")) {
actionerrors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.noemail"));
}
String type = orderForm.getType();
if(type.trim().equals("")) {
actionerrors.add("ActionErrors.GLOBAL_ERROR", new ActionError("error.notype"));
}
String[] items = orderForm.getItems();
if(items == null) {
actionerrors.add("ActionErrors.GLOBAL_ERROR", new ActionError("error.noitems"));
}
if(actionerrors.size() != 0) {
saveErrors(request, actionerrors);
return new ActionForward(mapping.getInput());
}
return mapping.findForward("OK");