1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
| package ca.uottawa.faidselfserv.model;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
/**
* Form bean for a Struts application.
* Users may access 5 fields on this form:
* <ul>
* <li>Start_Dt - [your comment here]
* <li>English_Html - [your comment here]
* <li>Notice_name - [your comment here]
* <li>French_Html - [your comment here]
* <li>End_Dt - [your comment here]
* </ul>
* @version 1.0
* @author
*/
public class AddEditNoticeBean extends ActionForm {
private String noticeName = null;
private String startDt = null;
private String endDt = null;
private String englishHtml = null;
private String frenchHtml = null;
private String updateTmst = null;
/*
* null value constructor
*/
/*
* student number constructor
*/
/**
* Method validate
* @param ActionMapping mapping
* @param HttpServletRequest request
* @return ActionErrors
*/
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
//throw new UnsupportedOperationException("Generated method 'validate(...)'");
ActionErrors errors = new ActionErrors();
if(noticeName == null || noticeName.length()==0) {
errors.add("noticeName",new ActionError("error.noticeName.required"));
}
if(startDt == null || startDt.length()==0) {
errors.add("startDt",new ActionError("error.startDt.required"));
}
if(endDt == null || endDt.length()==0) {
errors.add("endDt",new ActionError("error.endDt.required"));
}
return errors;
}
public AddEditNoticeBean() {
noticeName = "";
startDt = "";
endDt = "";
englishHtml = "";
frenchHtml = "";
updateTmst = "";
}
/**
* Get Start_Dt
* @return String
*/
public String getStartDt() {
return startDt;
}
/**
* Set Start_Dt
* @param <code>String</code>
*/
public void setStartDt(String s) {
this.startDt = s;
}
/**
* Get Notice_name
* @return String
*/
public String getNoticeName() {
return noticeName;
}
/**
* Set Notice_name
* @param <code>String</code>
*/
public void setNoticeName(String n) {
this.noticeName = n;
}
/**
* Get English_Html
* @return String
*/
public String getEnglishHtml() {
return englishHtml;
}
/**
* Set English_Html
* @param <code>String</code>
*/
public void setEnglishHtml(String e) {
this.englishHtml = e;
}
/**
* Get End_Dt
* @return String
*/
public String getEndDt() {
return endDt;
}
/**
* Set End_Dt
* @param <code>String</code>
*/
public void setEndDt(String e) {
this.endDt = e;
}
/**
* Get French_Html
* @return String
*/
public String getFrenchHtml() {
return frenchHtml;
}
/**
* Set French_Html
* @param <code>String</code>
*/
public void setFrenchHtml(String f) {
this.frenchHtml = f;
}
/**
* Get update time stump
* @return String
*/
public String getUpdateTmst() {
return updateTmst;
}
/**
* Set French_Html
* @param <code>String</code>
*/
public void setUpdateTmst(String t) {
this.updateTmst = t;
}
}
/**
* date sr# user
* ----------- ---- -------- --------------------------------------------
* 2005.Mar.31 na wwahl
* Created bean for FSMS Financial Aid Self Serve application
*/ |
Partager