private void createComponents()
{
// Doit pointer ailleurs...
this.add(HomePage.link("cancel", ViewPersonnePanel.class, null));
this.add(new RequiredTextField("nom", new PropertyModel(this.personne,
"nom")).setLabel(new Model("Nom")));
this.add(new RequiredTextField("prenom", new PropertyModel(
this.personne, "prenom")).setLabel(new Model("Prenom")));
this.add(new RequiredTextField("adresse", new PropertyModel(
this.personne, "adresse")).setLabel(new Model("Adresse")));
this.add(new RequiredTextField("ville", new PropertyModel(
this.personne, "ville")).setLabel(new Model("Ville")));
this.add(new RequiredTextField("province", new PropertyModel(
this.personne, "province")).setLabel(new Model("Province")));
this.add(new PaysDropDownChoice("pays", new PropertyModel(
this.personne, "pays")).setLabel(new Model("Pays"))
.setRequired(true));
this.add(new RequiredTextField("codePostal", new PropertyModel(
this.personne, "codePostal"))
.setLabel(new Model("Code postal")));
this.add(new RequiredTextField("telephone", new PropertyModel(
this.personne, "telephone"), Telephone.class)
{
/**
*
*/
private static final long serialVersionUID = -1622892079642695231L;
@Override
public IConverter getConverter()
{
return new MaskConverter("###-###-####", Telephone.class);
}
}.setLabel(new Model("Telephone")));
this.add(new SexeDropDownChoice("sexe", new PropertyModel(
this.personne, "sexe")).setLabel(new Model("Sexe"))
.setRequired(true));
this.add(new AnneesDropDownChoice("annees", new PropertyModel(
this.dateNaissance, "annee")).setLabel(new Model("Annees"))
.setRequired(true));
this.add(new MoisDropDownChoice("mois", new PropertyModel(
this.dateNaissance, "mois")).setLabel(new Model("Mois"))
.setRequired(true));
this.add(new JoursDropDownChoice("jours", new PropertyModel(
this.dateNaissance, "jour")).setLabel(new Model("Jours"))
.setRequired(true));
final RequiredTextField courriel = new RequiredTextField("courriel",
new PropertyModel(this.personne, "courriel"));
courriel.setLabel(new Model("Courriel")).setRequired(true);
courriel.add(EmailAddressPatternValidator.getInstance());
this.add(courriel);
}