}
this.listeClubsLine.add(new ClubLine(club.getNomComplet(), etat, club));
}
final Form form = new Form("clubForm")
{
/**
*
*/
private static final long serialVersionUID = 3163017677464598472L;
/*
* (non-Javadoc)
*
* @see wicket.markup.html.form.Form#onSubmit()
*/
@Override
protected void onSubmit()
{
AffiliationsClubs affClubs = ListClubsPanel.this.affClubs;
for (ClubLine line : ListClubsPanel.this.listeClubsLine)
{
//Si on veut ajouter le club a a saison
if (line.getEtat())
{
try
{
affClubs.createAffiliationClub(ListClubsPanel.this.saison, line.getClub());
super.error(String.valueOf(affClubs.size())+"Ajouté..."+line.getNomComplet());
}
catch (ActionException e)
{
throw new SystemeException(e);
}
}
//Si on veut supprimer le club de la saison.
else
{
try
{
affClubs.RemoveAffiliationClub(ListClubsPanel.this.saison, line.getClub());
}
catch (ActionException e)
{
throw new SystemeException(e);
}
}
}
super.onSubmit();
}
};
form.add(new ListClubsListView("ListeClubs", this.listeClubsLine));
Map<Parameters, Object> params = new HashMap<Parameters, Object>();
params = new HashMap<Parameters, Object>();
params.put(Parameters.SELECTED_ITEM, this.saison);
params.put(Parameters.IS_NEW, false);
form.add(HomePage.link("retour", GestionEvenementsPanel.class, params));
form.add(new FeedbackPanel("feedback"));
this.add(form);
}