1
2
3
4
5 package org.flowfuse.base.frontend;
6
7 import org.apache.commons.logging.Log;
8 import org.apache.commons.logging.LogFactory;
9 import org.flowfuse.base.model.Attachment;
10 import org.flowfuse.base.model.WorkItem;
11 import org.springframework.web.servlet.ModelAndView;
12 import org.springframework.web.servlet.view.RedirectView;
13
14 import javax.servlet.http.HttpServletRequest;
15
16 /***
17 * @author <a href="stefan@flowfuse.org">Stefan Kleineikenscheidt</a>,
18 * Flowfuse.org
19 * @version $Id: EditDocumentForm.java,v 1.1 2005/11/20 15:02:04 skleinei Exp $
20 */
21 public class EditDocumentForm extends BaseFormController {
22
23
24 public final static String rcsid = "$Id: EditDocumentForm.java,v 1.1 2005/11/20 15:02:04 skleinei Exp $";
25
26
27 protected final Log logger = LogFactory.getLog(this.getClass());
28
29 public EditDocumentForm() {
30 setFormView("editDocument");
31 }
32
33 protected Object formBackingObject(HttpServletRequest httpServletRequest) throws Exception {
34 WorkItem workItem = null;
35
36 if (workItem == null) {
37 return new WorkItem();
38 } else {
39 return workItem;
40 }
41 }
42
43 protected ModelAndView onSubmit(Object command) throws Exception {
44 Attachment attachment = (Attachment) command;
45
46 return new ModelAndView(new RedirectView("view"));
47 }
48
49
50
51 }
52
53