1 package org.nextime.ion.backoffice.action.workflow; 2 3 import java.io.IOException ; 4 import java.util.Hashtable ; 5 import javax.servlet.ServletException ; 6 import javax.servlet.http.HttpServletRequest ; 7 import javax.servlet.http.HttpServletResponse ; 8 import org.apache.struts.action.ActionForm; 9 import org.apache.struts.action.ActionForward; 10 import org.apache.struts.action.ActionMapping; 11 12 import org.nextime.ion.framework.business.Group; 13 import org.nextime.ion.framework.mapping.Mapping; 14 15 import org.nextime.ion.backoffice.action.BaseAction; 16 17 public class ChoixMDDAction extends BaseAction { 18 19 public ActionForward perform( 20 ActionMapping mapping, 21 ActionForm form, 22 HttpServletRequest request, 23 HttpServletResponse response) 24 throws IOException , ServletException { 25 26 checkUser(request); 28 29 if (request.getParameter("membreDD") != null) { 31 Hashtable inputs = new Hashtable (); 32 inputs.put("membreDDLogin", request.getParameter("membreDD")); 33 request.setAttribute("inputs", inputs); 34 request.setAttribute("id", request.getParameter("id")); 35 request.setAttribute("version", request.getParameter("version")); 36 request.setAttribute("action", request.getParameter("action")); 37 return (mapping.findForward("actions")); 38 } 39 40 try { 42 Mapping.begin(); 43 request.setAttribute( 44 "users", 45 Group.getInstance("MembresDD").listUsers()); 46 } catch (Exception e) { 47 e.printStackTrace(); 48 } finally { 49 Mapping.rollback(); 50 } 51 52 return (mapping.findForward("view")); 54 55 } 56 57 } 58 | Popular Tags |