KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > nextime > ion > backoffice > action > workflow > CommentaireAction


1 package org.nextime.ion.backoffice.action.workflow;
2
3 import java.io.IOException JavaDoc;
4 import java.util.Hashtable JavaDoc;
5 import javax.servlet.ServletException JavaDoc;
6 import javax.servlet.http.HttpServletRequest JavaDoc;
7 import javax.servlet.http.HttpServletResponse JavaDoc;
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.backoffice.action.BaseAction;
13
14 public class CommentaireAction extends BaseAction {
15
16     public ActionForward perform(
17         ActionMapping mapping,
18         ActionForm form,
19         HttpServletRequest JavaDoc request,
20         HttpServletResponse JavaDoc response)
21         throws IOException JavaDoc, ServletException JavaDoc {
22
23         // check if user is correctly logged
24
checkUser(request);
25
26         // si on a tous les elements
27
if (request.getParameter("commentaire") != null) {
28             Hashtable JavaDoc inputs = new Hashtable JavaDoc();
29             inputs.put("commentaire", request.getParameter("commentaire"));
30             request.setAttribute("inputs", inputs);
31             request.setAttribute("id", request.getParameter("id"));
32             request.setAttribute("version", request.getParameter("version"));
33             request.setAttribute("action", request.getParameter("action"));
34             return (mapping.findForward("actions"));
35         }
36         
37         // Forward to the next page
38
return (mapping.findForward("view"));
39
40     }
41
42 }
43
Popular Tags