| Line 26... |
Line 26... |
| 26 |
import com.extjs.gxt.ui.client.widget.layout.RowData;
|
26 |
import com.extjs.gxt.ui.client.widget.layout.RowData;
|
| 27 |
import com.extjs.gxt.ui.client.widget.layout.RowLayout;
|
27 |
import com.extjs.gxt.ui.client.widget.layout.RowLayout;
|
| 28 |
import com.extjs.gxt.ui.client.widget.menu.Menu;
|
28 |
import com.extjs.gxt.ui.client.widget.menu.Menu;
|
| 29 |
import com.extjs.gxt.ui.client.widget.menu.MenuItem;
|
29 |
import com.extjs.gxt.ui.client.widget.menu.MenuItem;
|
| 30 |
import com.google.gwt.core.client.GWT;
|
30 |
import com.google.gwt.core.client.GWT;
|
| - |
|
31 |
import com.google.gwt.user.client.Window;
|
| Line 31... |
Line 32... |
| 31 |
|
32 |
|
| Line 32... |
Line 33... |
| 32 |
public class EnteteVue extends LayoutContainer implements Rafraichissable {
|
33 |
public class EnteteVue extends LayoutContainer implements Rafraichissable {
|
| 33 |
|
34 |
|
| Line 136... |
Line 137... |
| 136 |
|
137 |
|
| 137 |
add(titreConteneurHtml, new RowData(.3, 1));
|
138 |
add(titreConteneurHtml, new RowData(.3, 1));
|
| 138 |
add(barreBoutons, new RowData(.7, 1));
|
139 |
add(barreBoutons, new RowData(.7, 1));
|
| Line 139... |
Line 140... |
| 139 |
}
|
140 |
}
|
| 140 |
|
141 |
|
| 141 |
public void rafraichir(Object nouvelleDonnees) {
|
142 |
public void rafraichir(Object nouvellesDonnees) {
|
| 142 |
if (nouvelleDonnees instanceof Information) {
|
143 |
if (nouvellesDonnees instanceof Information) {
|
| 143 |
Information info = (Information) nouvelleDonnees;
|
144 |
Information info = (Information) nouvellesDonnees;
|
| - |
|
145 |
if (info.getType().equals("maj_utilisateur")) {
|
| 144 |
if (info.getType().equals("maj_utilisateur")) {
|
146 |
Utilisateur utilisateur = ((Utilisateur) Registry.get(RegistreId.UTILISATEUR_COURANT));
|
| - |
|
147 |
if (utilisateur.isIdentifie() == true && utilisateur.getLicence().equals("1")) {
|
| - |
|
148 |
if (utilisateur.existeDansAnnuaire()) {
|
| - |
|
149 |
utilisateur.majUtilisateurInfoAnnuaire();
|
| 145 |
Utilisateur utilisateur = ((Utilisateur) Registry.get(RegistreId.UTILISATEUR_COURANT));
|
150 |
}
|
| 146 |
if (utilisateur.isIdentifie() == true) {
|
151 |
System.out.println(utilisateur);
|
| 147 |
identificationConteneurHtml.setHtml(Format.substitute(identificationInfoTpl, (new Params()).add("Bienvenue : "+utilisateur.getNomComplet())));
|
152 |
identificationConteneurHtml.setHtml(Format.substitute(identificationInfoTpl, (new Params()).add("Bienvenue : "+utilisateur.getNomComplet())));
|
| 148 |
identificationBouton.setText("Deconnexion");
|
153 |
identificationBouton.setText("Deconnexion");
|
| 149 |
identificationBouton.setIcon(Images.ICONES.deconnexion());
|
154 |
identificationBouton.setIcon(Images.ICONES.deconnexion());
|
| Line 153... |
Line 158... |
| 153 |
identificationBouton.setText("Identifiez vous...");
|
158 |
identificationBouton.setText("Identifiez vous...");
|
| 154 |
identificationBouton.setIcon(Images.ICONES.connexion());
|
159 |
identificationBouton.setIcon(Images.ICONES.connexion());
|
| 155 |
identificationBouton.setId(ComposantId.BTN_CONNEXION);
|
160 |
identificationBouton.setId(ComposantId.BTN_CONNEXION);
|
| 156 |
}
|
161 |
}
|
| 157 |
}
|
162 |
}
|
| - |
|
163 |
} else if (nouvellesDonnees instanceof Utilisateur ) {
|
| - |
|
164 |
|
| 158 |
} else {
|
165 |
} else {
|
| 159 |
GWT.log("Ce type d'objet n'est pas pris en compte par la méthode rafraichir de la classe "+getClass(), null);
|
166 |
GWT.log("Ce type d'objet n'est pas pris en compte par la méthode rafraichir de la classe "+getClass(), null);
|
| 160 |
}
|
167 |
}
|
| 161 |
layout();
|
168 |
layout();
|
| 162 |
}
|
169 |
}
|
| 163 |
}
|
170 |
}
|
| 164 |
|
171 |
|