1 package org.nextime.ion.admin.action.section; 2 3 4 import org.apache.struts.action.*; 5 import javax.servlet.http.*; 6 import javax.servlet.*; 7 import java.io.*; 8 import java.util.*; 9 import org.nextime.ion.framework.business.*; 10 import org.nextime.ion.framework.mapping.*; 11 12 13 public class ListSectionAction extends Action { 14 15 16 public ActionForward perform( 17 ActionMapping mapping, 18 ActionForm form, 19 HttpServletRequest request, 20 HttpServletResponse response) 21 throws IOException, ServletException { 22 23 request.setAttribute("view", "section"); 25 26 try { 27 Mapping.begin(); 28 Vector v = Section.listAll(); 29 Mapping.rollback(); 30 request.setAttribute("sections",v); 31 } 32 catch( MappingException e ) { 33 Mapping.rollback(); 34 throw new ServletException(e); 35 } 36 37 return mapping.findForward("view"); 38 } 39 40 } | Popular Tags |