Line | |
---|
1 | package com.medias.megapoli.struts.actions; |
---|
2 | |
---|
3 | import javax.servlet.ServletException; |
---|
4 | import javax.servlet.http.HttpServletRequest; |
---|
5 | import javax.servlet.http.HttpServletResponse; |
---|
6 | |
---|
7 | import org.apache.struts.action.Action; |
---|
8 | import org.apache.struts.action.ActionForm; |
---|
9 | import org.apache.struts.action.ActionForward; |
---|
10 | import org.apache.struts.action.ActionMapping; |
---|
11 | import com.medias.megapoli.struts.forms.MetadataForm; |
---|
12 | |
---|
13 | /** |
---|
14 | * @author combaz |
---|
15 | * |
---|
16 | * Created on 22 févr. 2005 |
---|
17 | */ |
---|
18 | public class InitNewSetAction extends Action { |
---|
19 | public ActionForward execute(ActionMapping mapping,ActionForm form, |
---|
20 | HttpServletRequest request, HttpServletResponse response) |
---|
21 | throws ServletException { |
---|
22 | String target = "failure"; |
---|
23 | |
---|
24 | if(form != null) { |
---|
25 | MetadataForm mform = (MetadataForm) form; |
---|
26 | String cat = (String) request.getParameter("categorie"); |
---|
27 | mform.init(cat); |
---|
28 | target = "success"; |
---|
29 | } |
---|
30 | |
---|
31 | return (mapping.findForward(target)); |
---|
32 | } |
---|
33 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.