| 1 25 29 package org.jresearch.gossip.actions.admin.group; 30 31 import java.sql.SQLException ; 32 33 import javax.servlet.http.HttpServletRequest ; 34 import javax.servlet.http.HttpServletResponse ; 35 36 import org.apache.struts.action.ActionForm; 37 import org.apache.struts.action.ActionForward; 38 import org.apache.struts.action.ActionMapping; 39 import org.jresearch.gossip.actions.BaseAction; 40 import org.jresearch.gossip.beans.forum.Group; 41 import org.jresearch.gossip.dao.ForumDAO; 42 import org.jresearch.gossip.exception.SystemException; 43 import org.jresearch.gossip.forms.ProcessGroupForm; 44 45 50 public class EditGroupAction extends BaseAction { 51 65 public ActionForward process(ActionMapping mapping, ActionForm form, 66 HttpServletRequest request, HttpServletResponse response) 67 throws SystemException { 68 ForumDAO dao = ForumDAO.getInstance(); 69 ProcessGroupForm pgForm = (ProcessGroupForm) form; 70 try { 71 72 Group group = dao.getGroupInfo(pgForm.getGid()); 73 request.setAttribute("group_name", group.getName()); 74 request.setAttribute("group_sort", group.getSort()); 75 request.setAttribute("gid", pgForm.getGid()); 76 } catch (SQLException sqle) { 77 getServlet().log("Connection.process", sqle); 78 throw new SystemException(sqle); 79 } 80 return (mapping.findForward("editGroup")); 81 } 82 } | Popular Tags |