this.add(new RequiredTextField("prenom").setLabel(new Model("Prenom"))
.setEnabled(!disableImmutable));
this.add(new TextField("adresse").setLabel(new Model("Adresse")));
this.add(new TextField("ville").setLabel(new Model("Ville")));
final ProvincesDropDownChoice provinceDropDownChoice = new ProvincesDropDownChoice(
"province");
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);
}
});