1 12 13 package org.ejtools.jmx.browser.web.form; 14 15 16 17 import javax.servlet.http.HttpServletRequest ; 18 19 20 21 import org.apache.struts.action.ActionError; 22 23 import org.apache.struts.action.ActionErrors; 24 25 import org.apache.struts.action.ActionForm; 26 27 import org.apache.struts.action.ActionMapping; 28 29 30 31 46 47 public class DetailForm extends ActionForm 48 49 { 50 51 52 53 protected String reference = null; 54 55 56 57 58 59 60 61 public DetailForm() { } 62 63 64 65 66 67 76 77 public String getReference() 78 79 { 80 81 return this.reference; 82 83 } 84 85 86 87 88 89 100 101 public void reset(ActionMapping mapping, HttpServletRequest request) { } 102 103 104 105 106 107 116 117 public void setReference(String reference) 118 119 { 120 121 this.reference = reference; 122 123 } 124 125 126 127 128 129 142 143 public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) 144 145 { 146 147 ActionErrors errors = new ActionErrors(); 148 149 150 151 if ((this.reference == null) || (this.reference.length() < 1)) 152 153 { 154 155 errors.add("reference", new ActionError("error.factory.required")); 156 157 } 158 159 160 161 return errors; 162 163 } 164 165 } 166 167 168 169 | Popular Tags |