String delName = null;
String button = request.getParameter("button");
if(button != null){
if(button.equals("Delete ")){
try {
DelSideForm form = new DelSideForm();
form = formBeanFactory.create(request);
delListSide.add(form.getSideid());
if(!form.isPresent()){
System.out.println("form built wrong!");
return "showAddSide.jsp";
}
//add deleted id into the delete list.
try {
if(form.getSideid() != null){
delName = sideDAO.getSideName(Integer.parseInt(form.getSideid())).getName();
}
sideDAO.Delete(Integer.parseInt(form.getSideid()));
} catch (NumberFormatException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (DAOException e) {
// TODO Auto-generated catch block