public String delete() throws Exception { HttpServletRequest request = Struts2Utils.getRequest(); String[] ids = request.getParameter("id").split(","); for (int i = 0; i < ids.length; i++) { chartoptionService.deleteChartoption(ids[i]); } return "delete"; }
@Override protected void prepareModel() throws Exception { if (id != null) { chartoption = chartoptionService.getChartOption(id); } else { chartoption = new ChartOption(); } }
public String update() throws Exception { HttpServletRequest request = Struts2Utils.getRequest(); String id = request.getParameter("id"); String fycname = request.getParameter("fycname"); Short oorder = Short.valueOf(request.getParameter("oorder")); chartoption.setFycname(fycname); chartoption.setOorder(oorder); chartoptionService.saveChartoption(chartoption); return "update"; }
public String insert() throws Exception { chartoption.setId(chartoption.getChartid() + "." + chartoption.getFy()); chartoptionService.saveChartoption(chartoption); return "insert"; }