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 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
| /*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.yourcompany.struts.form;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionError;
/**
* MyEclipse Struts
* Creation date: 02-25-2008
*
* XDoclet definition:
* @struts.form name="candidatInscriptionForm"
*/
public class CandidatInscriptionForm extends ActionForm {
/*
* Generated Methods
*/
private String TXT_Courriel;
private String TXT_CourrielConfirmation;
private String TXT_MotDePasse;
private String TXT_MotDePasseConfirmation;
private int DDL_Civilite;
private String TXT_Nom;
private String TXT_Prenom;
private String TXT_Adresse;
private String TXT_CodePostal;
private int DDL_Pays;
private String TXT_TelephoneFixe;
private String TXT_TelephonePortable;
private int DDL_SituationProfessionnelle;
private int CBL_TypeContact;
private String TXT_Ville;
private int DDL_AnneeNaissance;
private int DDL_MoisNaissance;
private int TXT_JourNaissance;
private int CBX_NewsLetter;
private int CBX_ConditionUtilisation;
private String TXT_CodeConfirmation;
public String getTXT_CodeConfirmation() {
return TXT_CodeConfirmation;
}
public void setTXT_CodeConfirmation(String TXT_CodeConfirmation) {
this.TXT_CodeConfirmation = TXT_CodeConfirmation;
}
public int getDDL_AnneeNaissance() {
return DDL_AnneeNaissance;
}
public void setDDL_AnneeNaissance(int DDL_AnneeNaissance) {
this.DDL_AnneeNaissance = DDL_AnneeNaissance;
}
public int getDDL_MoisNaissance() {
return DDL_MoisNaissance;
}
public void setDDL_MoisNaissance(int DDL_MoisNaissance) {
this.DDL_MoisNaissance = DDL_MoisNaissance;
}
public int getTXT_JourNaissance() {
return TXT_JourNaissance;
}
public void setTXT_JourNaissance(int TXT_JourNaissance) {
this.TXT_JourNaissance = TXT_JourNaissance;
}
public String getTXT_Courriel() {
return TXT_Courriel;
}
public void setTXT_Courriel(String TXT_Courriel) {
this.TXT_Courriel = TXT_Courriel;
}
public String getTXT_CourrielConfirmation() {
return TXT_CourrielConfirmation;
}
public void setTXT_CourrielConfirmation(String TXT_CourrielConfirmation) {
this.TXT_CourrielConfirmation = TXT_CourrielConfirmation;
}
public String getTXT_MotDePasse() {
return TXT_MotDePasse;
}
public void setTXT_MotDePasse(String TXT_MotDePasse) {
this.TXT_MotDePasse = TXT_MotDePasse;
}
public String getTXT_MotDePasseConfirmation() {
return TXT_MotDePasseConfirmation;
}
public void setTXT_MotDePasseConfirmation(String TXT_MotDePasseConfirmation) {
this.TXT_MotDePasseConfirmation = TXT_MotDePasseConfirmation;
}
public int getDDL_Civilite() {
return DDL_Civilite;
}
public void setDDL_Civilite(int DDL_Civilite) {
this.DDL_Civilite = DDL_Civilite;
}
public String getTXT_Nom() {
return TXT_Nom;
}
public void setTXT_Nom(String TXT_Nom) {
this.TXT_Nom = TXT_Nom;
}
public String getTXT_Prenom() {
return TXT_Prenom;
}
public void setTXT_Prenom(String TXT_Prenom) {
this.TXT_Prenom = TXT_Prenom;
}
public String getTXT_Adresse() {
return TXT_Adresse;
}
public void setTXT_Adresse(String TXT_Adresse) {
this.TXT_Adresse = TXT_Adresse;
}
public String getTXT_CodePostal() {
return TXT_CodePostal;
}
public void setTXT_CodePostal(String TXT_CodePostal) {
this.TXT_CodePostal = TXT_CodePostal;
}
public int getDDL_Pays() {
return DDL_Pays;
}
public void setDDL_Pays(int DDL_Pays) {
this.DDL_Pays = DDL_Pays;
}
public String getTXT_TelephoneFixe() {
return TXT_TelephoneFixe;
}
public void setTXT_TelephoneFixe(String TXT_TelephoneFixe) {
this.TXT_TelephoneFixe = TXT_TelephoneFixe;
}
public String getTXT_TelephonePortable() {
return TXT_TelephonePortable;
}
public void setTXT_TelephonePortable(String TXT_TelephonePortable) {
this.TXT_TelephonePortable = TXT_TelephonePortable;
}
public int getDDL_SituationProfessionnelle() {
return DDL_SituationProfessionnelle;
}
public void setDDL_SituationProfessionnelle(int DDL_SituationProfessionnelle) {
this.DDL_SituationProfessionnelle = DDL_SituationProfessionnelle;
}
public int getCBL_TypeContact() {
return CBL_TypeContact;
}
public void setCCBL_TypeContact(int CBL_TypeContact) {
this.CBL_TypeContact = CBL_TypeContact;
}
public String getTXT_Ville() {
return TXT_Ville;
}
public void setTXT_Ville(String TXT_Ville) {
this.TXT_Ville = TXT_Ville;
}
public int getCBX_NewsLetter() {
return CBX_NewsLetter;
}
public void setCBX_NewsLetter(int CBX_NewsLetter) {
this.CBX_NewsLetter = CBX_NewsLetter;
}
public int getCBX_ConditionUtilisation() {
return CBX_ConditionUtilisation;
}
public void setCBX_ConditionUtilisation(int CBX_ConditionUtilisation) {
this.CBX_ConditionUtilisation = CBX_ConditionUtilisation;
}
/**
* Method validate
* @param mapping
* @param request
* @return ActionErrors
*/
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
String code_conf=(String)request.getAttribute(nl.captcha.servlet.Constants.SIMPLE_CAPCHA_SESSION_KEY) ;
ActionErrors errors = new ActionErrors();
if (getTXT_Courriel() == null || getTXT_Courriel().length() < 1) {
errors.add("LBL_ErreurCourrielVide", new ActionError("error.courriel.required"));
}
/*else if (getTXT_CourrielConfirmation() == null || getTXT_CourrielConfirmation().length() < 1) {
errors.add("confirmationCourrielEmpty", new ActionError("error.confirmationCourriel.required"));
}*/
else if (getTXT_MotDePasse() == null || getTXT_MotDePasse().length() < 1) {
errors.add("LBL_ErreurMotDePasseVide", new ActionError("error.MotDePasse.required"));
}
/*else if (getTXT_MotDePasseConfirmation() == null || getTXT_MotDePasseConfirmation().length() < 1) {
errors.add("courrielEmpty", new ActionError("error.MotDePasseConfirmation.required"));
}*/
else if (getTXT_Nom() == null || getTXT_Nom().length() < 1) {
errors.add("LBL_ErreurNomVide", new ActionError("error.nom.required"));
}
else if (getTXT_Prenom() == null || getTXT_Prenom().length() < 1) {
errors.add("LBL_ErreurPrenomVide", new ActionError("error.prenom.required"));
}
//else if (getTXT_JourNaissance() == null || getTXT_JourNaissance().length() < 1) {
//errors.add("LBL_ErreurJourNaissanceVide", new ActionError("error.JourNaissance.required"));
//}
//else if (getDDL_MoisNaissance() == null || getDDL_MoisNaissance().length() < 1) {
//errors.add("LBL_ErreurMoisNaissanceVide", new ActionError("error.MoisNaissance.required"));
//}
//else if (getDDL_AnneeNaissance() == null || getDDL_AnneeNaissance().length() < 1) {
//errors.add("LBL_ErreurAnneeNaissanceVide", new ActionError("error.AnneeNaissance.required"));
//}
else if (getTXT_CodePostal() == null || getTXT_CodePostal().length() < 1) {
errors.add("LBL_codePostalErreur", new ActionError("error.CodePostal.required"));
}
else if (getTXT_Ville() == null || getTXT_Ville().length() < 1) {
errors.add("LBL_Ville", new ActionError("error.Ville.required"));
}
//else if (getDDL_SituationProfessionnelle() == null || getDDL_SituationProfessionnelle().length() < 1) {
//errors.add("LBL_ErreurSituationProfessionnelleVide", new ActionError("error.SituationProfessionnelle.required"));
//}
/*else if (getTXT_CodeConfirmation() == null || getTXT_CodeConfirmation().length() < 1) {
errors.add("LBL_CodeConfirmationVide", new ActionError("error.CodeConfirmation.required"));
}
*/
else if(!getTXT_Courriel().equals(getTXT_CourrielConfirmation()) )
{
errors.add("LBL_ErreurCourrielConfirmation", new ActionError("error.TXT_CourrielConfirmation.required"));
}
else if (!getTXT_MotDePasse().equals(getTXT_MotDePasseConfirmation()))
{
errors.add("LBL_ErreurMotDePasseInvalide", new ActionError("error.TXT_MotDePasseConfirmation.required"));
}
/*else if(!getTXT_CodeConfirmation().equals(code_conf))
{
errors.add("LBL_CodeConfirmationInvalide", new ActionError("error.TXT_CodeConfirmation.required"));
}*/
return errors;
}
/**
* Method reset
* @param mapping
* @param request
*/
public void reset(ActionMapping mapping, HttpServletRequest request) {
}
} |