adminLink = new Html(messages.adminstration());
adminLink.setStyleName("actionHTML");
adminLink.setVisible(false);
adminLink.setStyleAttribute("visibility", "hidden");
if (navigation.getContext().getUserModel() != null) {
UtilisateurGrpModel user = navigation.getContext().getUserModel();
String username = user.getIdentifiant();
if (user.getBadmin() == null) {
adminLink.setVisible(false);
}
if (user.getBadmin() != null && user.getBadmin() == false) {
adminLink.setVisible(false);
}
if (user.getBadmin() != null && user.getBadmin() == true) {
adminLink.setVisible(true);
adminLink.setStyleAttribute("visibility", "visible");
}
if (user != null && user.getIdentifiant() != null) {
nomLabel.setText(messages.hello() + Constants.SPACE + username.substring(username.lastIndexOf("\\") + 1, username.length()));
acceuilLink.setVisible(true);
if (user.getBadmin() == null || user.getBadmin() == false) {
adminLink.setVisible(false);
}
} else {
nomLabel.setText(messages.hello());
}