orderList = null;
pageDirection = null;
}
public void validate() {
ActionContext ctx = ActionContext.getActionContext();
if (!this.isShippingAddressRequired()) {
validateRequiredField(order.getCreditCard(), "FAKE (!) credit card number required.");
validateRequiredField(order.getExpiryDate(), "Expiry date is required.");
validateRequiredField(order.getCardType(), "Card type is required.");
validateRequiredField(order.getShipToFirstName(), "Shipping Info: first name is required.");
validateRequiredField(order.getShipToLastName(), "Shipping Info: last name is required.");
validateRequiredField(order.getShipAddress1(), "Shipping Info: address is required.");
validateRequiredField(order.getShipCity(), "Shipping Info: city is required.");
validateRequiredField(order.getShipState(), "Shipping Info: state is required.");
validateRequiredField(order.getShipZip(), "Shipping Info: zip/postal code is required.");
validateRequiredField(order.getShipCountry(), "Shipping Info: country is required.");
validateRequiredField(order.getBillToFirstName(), "Billing Info: first name is required.");
validateRequiredField(order.getBillToLastName(), "Billing Info: last name is required.");
validateRequiredField(order.getBillAddress1(), "Billing Info: address is required.");
validateRequiredField(order.getBillCity(), "Billing Info: city is required.");
validateRequiredField(order.getBillState(), "Billing Info: state is required.");
validateRequiredField(order.getBillZip(), "Billing Info: zip/postal code is required.");
validateRequiredField(order.getBillCountry(), "Billing Info: country is required.");
}
if (ctx.isSimpleErrorsExist()) {
order.setBillAddress1(order.getShipAddress1());
order.setBillAddress2(order.getShipAddress2());
order.setBillToFirstName(order.getShipToFirstName());
order.setBillToLastName(order.getShipToLastName());
order.setBillCity(order.getShipCity());