Line 22... |
Line 22... |
22 |
import org.tela_botanica.client.modeles.projet.ProjetListe;
|
22 |
import org.tela_botanica.client.modeles.projet.ProjetListe;
|
23 |
import org.tela_botanica.client.modeles.structure.Structure;
|
23 |
import org.tela_botanica.client.modeles.structure.Structure;
|
24 |
import org.tela_botanica.client.modeles.structure.StructureListe;
|
24 |
import org.tela_botanica.client.modeles.structure.StructureListe;
|
25 |
import org.tela_botanica.client.synchronisation.Sequenceur;
|
25 |
import org.tela_botanica.client.synchronisation.Sequenceur;
|
26 |
import org.tela_botanica.client.util.Debug;
|
26 |
import org.tela_botanica.client.util.Debug;
|
- |
|
27 |
import org.tela_botanica.client.util.UtilString;
|
27 |
import org.tela_botanica.client.vues.Formulaire;
|
28 |
import org.tela_botanica.client.vues.Formulaire;
|
28 |
import org.tela_botanica.client.vues.FormulaireOnglet;
|
29 |
import org.tela_botanica.client.vues.FormulaireOnglet;
|
Line 29... |
Line 30... |
29 |
|
30 |
|
30 |
import com.extjs.gxt.ui.client.data.ModelData;
|
31 |
import com.extjs.gxt.ui.client.data.ModelData;
|
Line 107... |
Line 108... |
107 |
idCollectionChp = new HiddenField<String>();
|
108 |
idCollectionChp = new HiddenField<String>();
|
108 |
this.add(idCollectionChp);
|
109 |
this.add(idCollectionChp);
|
109 |
}
|
110 |
}
|
Line 110... |
Line 111... |
110 |
|
111 |
|
- |
|
112 |
private void creerFieldsetLiaison() {
|
111 |
private void creerFieldsetLiaison() {
|
113 |
|
112 |
FieldSet liaisonFieldSet = new FieldSet();
|
114 |
FieldSet liaisonFieldSet = new FieldSet();
|
113 |
liaisonFieldSet.setHeading(i18nC.liaisonTitreCollection());
|
115 |
liaisonFieldSet.setHeading(i18nC.liaisonTitreCollection());
|
114 |
liaisonFieldSet.setCollapsible(true);
|
116 |
liaisonFieldSet.setCollapsible(true);
|
Line 207... |
Line 209... |
207 |
|
209 |
|
208 |
collectionsCombo = new ChampComboBoxRechercheTempsReelPaginable(proxyCollections, modelTypeCollections, displayNameCollections);
|
210 |
collectionsCombo = new ChampComboBoxRechercheTempsReelPaginable(proxyCollections, modelTypeCollections, displayNameCollections);
|
209 |
collectionsCombo.setWidth(250, 600);
|
211 |
collectionsCombo.setWidth(250, 600);
|
210 |
collectionsCombo.getCombo().setTabIndex(tabIndex++);
|
212 |
collectionsCombo.getCombo().setTabIndex(tabIndex++);
|
211 |
collectionsCombo.getCombo().setFieldLabel(i18nC.lienMereCollection());
|
213 |
collectionsCombo.getCombo().setFieldLabel(i18nC.lienMereCollection());
|
Line 212... |
Line 214... |
212 |
collectionsCombo.getCombo().setForceSelection(true);
|
214 |
collectionsCombo.getCombo().setForceSelection(true);
|
213 |
|
215 |
|
214 |
collectionsCombo.getCombo().setValidator(new Validator() {
|
216 |
collectionsCombo.getCombo().setValidator(new Validator() {
|
215 |
public String validate(Field<?> field, String value) {
|
217 |
public String validate(Field<?> field, String value) {
|
Line 429... |
Line 431... |
429 |
valeur = structure.getId();
|
431 |
valeur = structure.getId();
|
430 |
}
|
432 |
}
|
431 |
return valeur;
|
433 |
return valeur;
|
432 |
}
|
434 |
}
|
433 |
private void setValeurComboStructures() {
|
435 |
private void setValeurComboStructures() {
|
434 |
if (structuresCombo.getStore() != null && collection != null) {
|
436 |
/*if (structuresCombo.getStore() != null && collection != null) {
|
435 |
structuresCombo.getCombo().setValue(structuresCombo.getStore().findModel("cs_id_structure", collection.getIdStructure()));
|
437 |
structuresCombo.getCombo().setValue(structuresCombo.getStore().findModel("cs_id_structure", collection.getIdStructure()));
|
- |
|
438 |
}*/
|
- |
|
439 |
if (structuresCombo.getCombo().getStore() != null
|
- |
|
440 |
&& collection != null
|
- |
|
441 |
&& collection.getStructureNom() != null
|
- |
|
442 |
&& !UtilString.isEmpty(collection.getStructureNom())) {
|
- |
|
443 |
structuresCombo.chargerValeurInitiale(collection.getStructureNom(), "cs_nom");
|
- |
|
444 |
} else {
|
- |
|
445 |
structuresCombo.getCombo().setValue(null);
|
436 |
}
|
446 |
}
|
437 |
}
|
447 |
}
|
Line 438... |
Line 448... |
438 |
|
448 |
|
439 |
private String getValeurComboCollections() {
|
449 |
private String getValeurComboCollections() {
|
Line 442... |
Line 452... |
442 |
Collection collection = new Collection(collectionsCombo.getValeur());
|
452 |
Collection collection = new Collection(collectionsCombo.getValeur());
|
443 |
valeur = collection.getId();
|
453 |
valeur = collection.getId();
|
444 |
}
|
454 |
}
|
445 |
return valeur;
|
455 |
return valeur;
|
446 |
}
|
456 |
}
|
447 |
private void setValeurComboCollections() {
|
457 |
private void setValeurComboCollections() {
|
448 |
if (collectionsCombo.getCombo().getStore() != null && collection != null) {
|
458 |
if (collectionsCombo.getCombo().getStore() != null
|
- |
|
459 |
&& collection != null
|
- |
|
460 |
&& collection.getCollectionMereNom() != null
|
- |
|
461 |
&& !UtilString.isEmpty(collection.getCollectionMereNom())) {
|
- |
|
462 |
|
449 |
collectionsCombo.getCombo().setValue(collectionsCombo.getStore().findModel("cc_ce_mere", collection.getCollectionMereId()));
|
463 |
collectionsCombo.chargerValeurInitiale(collection.getCollectionMereNom(), "cc_nom");
|
450 |
}
|
464 |
}
|
451 |
}
|
465 |
}
|
Line 452... |
Line 466... |
452 |
|
466 |
|
453 |
public void rafraichir(Object nouvellesDonnees) {
|
467 |
public void rafraichir(Object nouvellesDonnees) {
|