HttpServletRequest request,
HttpServletResponse response,
Object command,
BindException bindExp) {
RowSegmentCommand rowSegmentCommand = (RowSegmentCommand) command;
Long matrix_row_id = ControllerUtil.getMatrixRowId(request);
MatrixRow matrixRow = mMatrixRowService.findByID(matrix_row_id);
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("++MARTIX ROW ID++ : " + matrix_row_id.toString());
}
// will never get here. see onCancel().
// if (request.getParameter(ACTION_CANCEL) != null) {
// System.out.println("MARTIX ROW ID In Cancel Button: " + matrix_row_id.toString());
// return null;
// // return new ModelAndView(getSuccessView() + "?id=" + matrix_row_id.toString());
// }
// get matrix so we can have the taxon label to show to user
if (request.getParameter(ACTION_SUBMIT) != null) {
System.out.println("MARTIX ROW ID In Submit Button: " + matrix_row_id.toString());
matrixRow.addSegment(rowSegmentCommand.getRowSegment());
mMatrixRowService.update(matrixRow);
} else if (request.getParameter(ACTION_UPDATE) != null) {
mRowSegmentService.update(rowSegmentCommand.getRowSegment());
} else if (request.getParameter(ACTION_DELETE) != null) {
mRowSegmentService.deleteRowSegment(rowSegmentCommand.getRowSegment());
}
return new ModelAndView(getSuccessView() + "?id=" + matrix_row_id.toString());
}