View Javadoc
1 /* 2 * Demosys. 3 * 4 * Terms of license - http://opensource.org/licenses/apachepl.php 5 */ 6 package org.demosys.web.project.action; 7 import org.apache.struts.action.ActionError; 8 import org.apache.struts.action.ActionErrors; 9 import org.apache.struts.action.ActionForm; 10 import org.apache.struts.action.ActionMapping; 11 import org.demosys.web.project.ProjectView; 12 /*** 13 * Formulaire pour la creation d'un projet. 14 * 15 * @author ABOUELF 16 * 17 * @deprecated 11 avril 2003 18 */ 19 public class NewProjectForm extends ActionForm { 20 private String name; 21 private String description; 22 23 public void reset(ActionMapping actionMapping, 24 javax.servlet.http.HttpServletRequest httpServletRequest) { 25 setName(null); 26 setDescription(null); 27 } 28 29 30 public ActionErrors validate(ActionMapping actionMapping, 31 javax.servlet.http.HttpServletRequest httpServletRequest) { 32 ActionErrors errors = new ActionErrors(); 33 34 if (this.getName().length() < 2) { 35 errors.add("title", new ActionError("project.new.error.title")); 36 } 37 38 return errors; 39 } 40 41 42 public String getName() { 43 return name; 44 } 45 46 47 public void setName(String name) { 48 this.name = name; 49 } 50 51 52 public String getDescription() { 53 return description; 54 } 55 56 57 public void setDescription(String description) { 58 this.description = description; 59 } 60 61 62 public ProjectView toProjectView() { 63 ProjectView project = new ProjectView(); 64 project.setName(getName()); 65 project.setDescription(getDescription()); 66 67 return project; 68 } 69 }

This page was automatically generated by Maven