| 1 6 7 package com.quikj.application.communicator.applications.webtalk.controller; 8 9 import javax.servlet.http.HttpServletRequest ; 10 import org.apache.struts.action.ActionError; 11 import org.apache.struts.action.ActionErrors; 12 import org.apache.struts.action.ActionForm; 13 import org.apache.struts.action.ActionMapping; 14 18 public class RenameFileForm extends ActionForm{ 19 private String fileName ; 20 private String renameTo; 21 22 23 public ActionErrors validate(ActionMapping mapping, 24 HttpServletRequest request) { 25 26 ActionErrors errors = new ActionErrors(); 27 if (fileName==null || fileName.length()== 0) 28 { 29 errors.add("fileName", new ActionError("file.name.enter")); 30 } 31 32 if (renameTo==null || renameTo.length()== 0) 33 { 34 errors.add("fileName", new ActionError("file.name.enter")); 35 } 36 37 return errors; 38 39 40 } 41 42 46 public java.lang.String getFileName() { 47 return fileName; 48 } 49 50 54 public void setFileName(java.lang.String fileName) { 55 this.fileName = fileName; 56 } 57 58 62 public java.lang.String getRenameTo() { 63 return renameTo; 64 } 65 66 70 public void setRenameTo(java.lang.String renameTo) { 71 this.renameTo = renameTo; 72 } 73 74 75 public RenameFileForm() { 76 } 77 78 } 79 | Popular Tags |