1 package org.nextime.ion.admin.action.group; 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 ListGroupAction 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", "group"); 25 26 try { 27 Mapping.begin(); 28 Vector v = Group.listAll(); 29 Mapping.commit(); 30 request.setAttribute("groups",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 |