| Line 175... |
Line 175... |
| 175 |
|
175 |
|
| 176 |
public void chargerValeurInitiale(String valeurInitiale, String champ) {
|
176 |
public void chargerValeurInitiale(String valeurInitiale, String champ) {
|
| 177 |
this.valeurInitiale = valeurInitiale;
|
177 |
this.valeurInitiale = valeurInitiale;
|
| 178 |
this.champValeurInitiale = champ;
|
178 |
this.champValeurInitiale = champ;
|
| 179 |
if(combo.getStore().findModel(champValeurInitiale, valeurInitiale) == null) {
|
179 |
if(combo.getStore().findModel(champValeurInitiale, valeurInitiale) == null) {
|
| 180 |
loader.load(plc, "", true);
|
180 |
loader.load(plc, "", true);
|
| 181 |
this.getCombo().disable();
|
181 |
this.getCombo().disable();
|
| 182 |
} else {
|
182 |
} else {
|
| 183 |
combo.setValue(combo.getStore().findModel(champValeurInitiale, valeurInitiale));
|
183 |
combo.setValue(combo.getStore().findModel(champValeurInitiale, valeurInitiale));
|
| 184 |
}
|
184 |
}
|
| Line 192... |
Line 192... |
| 192 |
Information info = (Information) nouvellesDonnees;
|
192 |
Information info = (Information) nouvellesDonnees;
|
| 193 |
if (info.getType().equals("selectionnerValeurCombo")) {
|
193 |
if (info.getType().equals("selectionnerValeurCombo")) {
|
| 194 |
if (combo.getStore().findModel(champValeurInitiale, valeurInitiale) == null) {
|
194 |
if (combo.getStore().findModel(champValeurInitiale, valeurInitiale) == null) {
|
| 195 |
// Si la valeur ne fait pas partie de la première page, on doit charger la liste complète
|
195 |
// Si la valeur ne fait pas partie de la première page, on doit charger la liste complète
|
| 196 |
// C'est un peu moche mais pour le moment ça marche (les listes ne dépassant pas quelques
|
196 |
// C'est un peu moche mais pour le moment ça marche (les listes ne dépassant pas quelques
|
| 197 |
// centaines d'élements)
|
197 |
// centaines d'élements), on s'arrete par contre si on a atteint le total d'éléments
|
| 198 |
if(!valeurInitialeAffectee) {
|
198 |
if(!valeurInitialeAffectee && combo.getStore().getCount() < loader.getTotalCount()) {
|
| 199 |
loader.load(start, loader.getTotalCount());
|
199 |
loader.load(start, loader.getTotalCount());
|
| - |
|
200 |
} else {
|
| - |
|
201 |
this.getCombo().enable();
|
| 200 |
}
|
202 |
}
|
| 201 |
} else {
|
203 |
} else {
|
| 202 |
combo.setValue(combo.getStore().findModel(champValeurInitiale, valeurInitiale));
|
204 |
combo.setValue(combo.getStore().findModel(champValeurInitiale, valeurInitiale));
|
| 203 |
valeurInitialeAffectee = true;
|
205 |
valeurInitialeAffectee = true;
|
| 204 |
this.getCombo().enable();
|
206 |
this.getCombo().enable();
|