public FormSubmission processOrderUpdateRequest() {
FormSubmission fs = new FormSubmission();
l.info("order update");
Orders o = getOrder();
String action = req.getParameter(Parameters.ORDER_CONFIRM.getId());
if (action.equals("Update Order")) {
if (req.getParameter(Parameters.TRACKING_NUMBER.getId()) != null) {
o.setTrackingNumber(req.getParameter(Parameters.TRACKING_NUMBER.getId()));
o.setTimeShipped(new Date(new java.util.Date().getTime()));
fs.setResultMessage("Order Updated");
}
else {
fs.setResultMessage("Invalid Tracking Number");
fs.setResultView(getOrderDetailsView(null, true));
return fs;
}
}
else if (action.equals("Cancel Order")) {
o.setReturnInd(true);
fs.setResultMessage("Order Cannceled");
}
fs.setResultView(getOrderDetailsView(null, true));
service.store(o);