add(new TextArea("conditionARespecterEn"));
add(new DropDownChoice("secteur", secteurService.list(),
new SecteurChoiceRenderer()));
add(new Label("image.name"));
add(viewImageLink = new PageLink("viewImage", new IPageLink()
{
private static final long serialVersionUID = 1L;
public Page getPage()
{
return new ImageViewPage(saison.getImage());
}
public Class getPageIdentity()
{
return ImageViewPage.class;
}
}).setPopupSettings(new PopupSettings(PopupSettings.SCROLLBARS)));
add(new PageLink("chooseImage", new IPageLink()
{
private static final long serialVersionUID = 1L;
public Page getPage()
{
return new FileUploadPage(fileUploadContext,
ResourceService.IMAGE_FORMATS, SaisonUpdateForm.this
.getPage());
}
public Class getPageIdentity()
{
return FileUploadPage.class;
}
}).setEnabled(!isNew));
add(new Button("ok")
{
private static final long serialVersionUID = 1L;
@Override
public void onSubmit()
{
saisonService.save(saison);
this.setResponsePage(new SaisonUpdatePage(saison, false));
}
});
add(new Button("delete")
{
private static final long serialVersionUID = 1L;
@Override
public void onSubmit()
{
try
{
saisonService.delete(saison);
this.setResponsePage(new GestionEvenementsPage());
}
catch (final DataIntegrityViolationException e)
{
this.error("La saison ne peut être supprimée "
+ "car elle contient des inscriptions. ");
}
}
}.setDefaultFormProcessing(false).setVisible(!isNew));
add(new Button("cancel")
{
private static final long serialVersionUID = 1L;
@Override
public void onSubmit()
{
setResponsePage(new GestionEvenementsPage());
}
}.setDefaultFormProcessing(false));
add(new PageLink("ajouterEvenement", new IPageLink()
{
private static final long serialVersionUID = 1L;
public Page getPage()
{
final Evenement evenement = new Evenement();
evenement.setSaison(saison);
evenement.setUrlInfoCourse("http://");
return new EvenementUpdatePage(evenement, true);
}
public Class getPageIdentity()
{
return EvenementUpdatePage.class;
}
}).setVisible(!isNew));
add(new PageLink("categoriesParticipantes", new IPageLink()
{
private static final long serialVersionUID = 1L;
public Page getPage()
{
return new CategoriesParticipantesPage(saison);
}
public Class getPageIdentity()
{
return CategoriesParticipantesPage.class;
}
}).setVisible(!isNew));
add(new PageLink("listeClubs", new IPageLink()
{
private static final long serialVersionUID = 1L;
public Page getPage()
{
return new ClubAffiliesPage(saison);
}
public Class getPageIdentity()
{
return ClubAffiliesPage.class;
}
}).setVisible(!isNew));
add(new PageLink("gestionPlaques", new IPageLink()
{
private static final long serialVersionUID = 1L;
public Page getPage()
{
return new PlaquesAttribueesListPage(saison);
}
public Class getPageIdentity()
{
return PlaquesAttribueesListPage.class;
}
}).setVisible(!isNew));
add(new PageLink("listePlaques", new IPageLink()
{
private static final long serialVersionUID = 1L;
public Page getPage()
{
return new ListePlaquePage(saison);
}
public Class getPageIdentity()
{
return ListePlaquePage.class;
}
}).setVisible(!isNew));
add(new PageLink("importationDonneesTerrain", new IPageLink()
{
private static final long serialVersionUID = 1L;
public Page getPage()
{