new PropertyModel(this.cart, "clubOid"), this.clubsCtrl
.getClubs(), new ClubChoiceRender());
dropDownChoice.setRequired(false);
this.add(dropDownChoice);
this.add(new Button("payer")
{
private static final long serialVersionUID = 3534043602619164257L;
@Override
public void onSubmit()
{
/*
* Vérification si le panier est vide
*/
if (CartListViewForm.this.cart.getCart().size() < 1)
{
final String errmsg = this.getLocalizer().getString(
"clubError", this, "Le panier est vide");
this.error(errmsg);
}
/*
* Vérification si un club a été choisi
*/
else if (clubsCtrl.getClubByOid(CartListViewForm.this.cart
.getClubOid()) == null)
{
final String errmsg = this
.getLocalizer()
.getString(
"clubError",
this,
"Vous devez sélectionner un club affilié ou indépendant si vous n'êtes pas affilié à un club");
this.error(errmsg);
}
else
{
this.setResponsePage(new HomePage(
ConfirmationListViewPanel.class, null));
}
}
});
this.add(new Button("autreCourse")
{
private static final long serialVersionUID = 3534043602619164257L;
@Override
public void onSubmit()
{
this.setResponsePage(new HomePage(
CoursesSelectionListViewPanel.class, null));
}
});
this.add(new Button("retirer")
{
private static final long serialVersionUID = 0L;
@Override