private void CreateComponentsUserConnected()
{
// Accueil
final PageLink linkAccueil = new PageLink("linkAccueil",
MemberMainPage.class);
linkAccueil.add(new Label("lblAccueil", getLocalizer().getString(
"welcome", this)));
this.add(linkAccueil);
// Menu #1 - Mon compte
final PageLink linkMenu1 = new PageLink("linkMenu1",
PersonnalInfoPage.class);
linkMenu1.add(new Label("lblMenu1", getLocalizer().getString("profile",
this)));
this.add(linkMenu1);
// Menu des entraîneurs
boolean coachmenuVisible = this.session.getCompte().getCoachOf() != null;
Label labelMenuCoach = new Label("divMenuCoach", getLocalizer()
.getString("coach", this));
this.add(labelMenuCoach.setVisible(coachmenuVisible));
final PageLink linkGestionMembresClub = new PageLink(
"linkGestionMembres", PersonsInClubPage.class);
final PageLink linkGestionInscriptionsClub = new PageLink(
"linkGestionInscriptions", new IPageLink()
{
private static final long serialVersionUID = 1L;
public Class getPageIdentity()
{
return DelegateRegistrationModePage.class;
}
public Page getPage()
{
return new DelegateRegistrationModePage(
Etapes.AutrePersonne,
DelegateRegistrationMode.COACH);
}
});
linkGestionMembresClub.add(new Label("lblGestionMembresClub",
getLocalizer().getString("manageClubMember", this)));
linkGestionInscriptionsClub.add(new Label("lblInscriptionsClub",
getLocalizer().getString("registerClubMember", this)));
this.add(linkGestionMembresClub.setVisible(coachmenuVisible));
this.add(linkGestionInscriptionsClub.setVisible(coachmenuVisible));
// Menu #4 - Panier
final PageLink linkMenu4 = new PageLink("linkMenu4",
CartListViewPage.class);
linkMenu4.add(new Label("lblMenu4", getLocalizer().getString("cart",
this)));
this.add(linkMenu4);
//Menu #2 - Inscriptions
this.add(new Label("divMenu2", getLocalizer().getString(
"registrations", this)));
final PageLink link1Menu2 = new PageLink("link1Menu2", SaisonPage.class);
link1Menu2.add(new Label("lbl1Menu2", getLocalizer().getString(
"register", this)));
this.add(link1Menu2);
final PageLink link2Menu2 = new PageLink("link2Menu2", new IPageLink()
{
private static final long serialVersionUID = 1L;
public Class getPageIdentity()
{
return DelegateRegistrationModePage.class;
}
public Page getPage()
{
return new DelegateRegistrationModePage(Etapes.AutrePersonne);
}
});
link2Menu2.add(new Label("lbl2Menu2", getLocalizer().getString(
"deleteRegistration", this)));
this.add(link2Menu2);
final PageLink link3Menu2 = new PageLink("link3Menu2",
MesCoursesPage.class);
link3Menu2.add(new Label("lbl3Menu2", getLocalizer().getString(
"viewRegistrations", this)));
this.add(link3Menu2);
final PageLink link4Menu2 = new PageLink("link4Menu2",
MesTransactionsPage.class);
link4Menu2.add(new Label("lbl4Menu2", getLocalizer().getString(
"viewTransactions", this)));
this.add(link4Menu2);
//Consulter Inscription
this.add(new Label("linkConsulterInscription").setVisible(false));