provinceDropDownChoice.setOutputMarkupId(true);
provinceDropDownChoice
.setProviceDropDownChoiceState(personne.getPays());
this.add(provinceDropDownChoice);
final DropDownChoice paysDropDownChoice = new PaysDropDownChoice("pays");
paysDropDownChoice
.add(new AjaxFormComponentUpdatingBehavior("onchange")
{
private static final long serialVersionUID = 1L;
@Override
protected void onUpdate(AjaxRequestTarget target)
{
provinceDropDownChoice
.setProviceDropDownChoiceState(personne
.getPays());
target.addComponent(provinceDropDownChoice);
}
});
paysDropDownChoice.setRequired(true);
this.add(paysDropDownChoice);
this
.add(new TextField("codePostal").setLabel(new Model(
"Code postal")));
this.add(new TextField("telephone").setLabel(new Model("Telephone")));
this.add(new SexePersonneDropDownChoice("sexe").setLabel(
new Model("Sexe")).setRequired(true).setEnabled(
!disableImmutable));
this.add(new AnneesDropDownChoice("annee", new PropertyModel(personne,
"annee")).setLabel(new Model("Année")).setRequired(true)
.setEnabled(!disableImmutable));
this.add(new MoisDropDownChoice("mois", new PropertyModel(personne,
"mois")).setLabel(new Model("Mois")).setRequired(true)
.setEnabled(!disableImmutable));
this.add(new JoursDropDownChoice("jour", new PropertyModel(personne,
"jour")).setLabel(new Model("Jour")).setRequired(true)
.setEnabled(!disableImmutable));
final DropDownChoice dropDownChoice = new PaysDropDownChoice(
"nationalite");
dropDownChoice.setRequired(true);
this.add(dropDownChoice);
this.add(new TextField("allergies"));
this.add(new TextField("emergencyContact"));
this.add(new TextField("emergencyNumber").setRequired(false));