| Line 4... |
Line 4... |
| 4 |
import java.util.Iterator;
|
4 |
import java.util.Iterator;
|
| 5 |
import java.util.List;
|
5 |
import java.util.List;
|
| Line 6... |
Line 6... |
| 6 |
|
6 |
|
| 7 |
import org.tela_botanica.client.ComposantClass;
|
7 |
import org.tela_botanica.client.ComposantClass;
|
| - |
|
8 |
import org.tela_botanica.client.Mediateur;
|
| 8 |
import org.tela_botanica.client.Mediateur;
|
9 |
import org.tela_botanica.client.composants.ChampComboBoxRechercheTempsReelPaginable;
|
| - |
|
10 |
import org.tela_botanica.client.composants.InfoLogger;
|
| - |
|
11 |
import org.tela_botanica.client.composants.pagination.ProxyProjets;
|
| 9 |
import org.tela_botanica.client.composants.InfoLogger;
|
12 |
import org.tela_botanica.client.composants.pagination.ProxyStructures;
|
| 10 |
import org.tela_botanica.client.images.Images;
|
13 |
import org.tela_botanica.client.images.Images;
|
| 11 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
14 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
| 12 |
import org.tela_botanica.client.modeles.Information;
|
15 |
import org.tela_botanica.client.modeles.Information;
|
| 13 |
import org.tela_botanica.client.modeles.MenuApplicationId;
|
16 |
import org.tela_botanica.client.modeles.MenuApplicationId;
|
| Line 32... |
Line 35... |
| 32 |
import org.tela_botanica.client.vues.personne.PersonneForm;
|
35 |
import org.tela_botanica.client.vues.personne.PersonneForm;
|
| Line 33... |
Line 36... |
| 33 |
|
36 |
|
| 34 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
37 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
| 35 |
import com.extjs.gxt.ui.client.Style.SortDir;
|
38 |
import com.extjs.gxt.ui.client.Style.SortDir;
|
| - |
|
39 |
import com.extjs.gxt.ui.client.core.XTemplate;
|
| - |
|
40 |
import com.extjs.gxt.ui.client.data.ModelData;
|
| 36 |
import com.extjs.gxt.ui.client.core.XTemplate;
|
41 |
import com.extjs.gxt.ui.client.data.ModelType;
|
| 37 |
import com.extjs.gxt.ui.client.event.BaseEvent;
|
42 |
import com.extjs.gxt.ui.client.event.BaseEvent;
|
| 38 |
import com.extjs.gxt.ui.client.event.ButtonEvent;
|
43 |
import com.extjs.gxt.ui.client.event.ButtonEvent;
|
| 39 |
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
44 |
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
| 40 |
import com.extjs.gxt.ui.client.event.Events;
|
45 |
import com.extjs.gxt.ui.client.event.Events;
|
| Line 88... |
Line 93... |
| 88 |
private static boolean publicationAPersonneListeChargementOk = false;
|
93 |
private static boolean publicationAPersonneListeChargementOk = false;
|
| 89 |
private PersonneListe auteursAjoutes = null;
|
94 |
private PersonneListe auteursAjoutes = null;
|
| 90 |
private PersonneListe auteursSupprimes = null;
|
95 |
private PersonneListe auteursSupprimes = null;
|
| Line 91... |
Line 96... |
| 91 |
|
96 |
|
| 92 |
private ContentPanel auteursFieldset = null;
|
97 |
private ContentPanel auteursFieldset = null;
|
| 93 |
private ComboBox<Projet> projetsCombo = null;
|
98 |
private ChampComboBoxRechercheTempsReelPaginable projetsCombo = null;
|
| 94 |
private ArrayList<ComboBox<Personne>> auteurComboboxListe = null;
|
99 |
private ArrayList<ComboBox<Personne>> auteurComboboxListe = null;
|
| 95 |
private ListStore<Personne> auteursStorePartage = null;
|
100 |
private ListStore<Personne> auteursStorePartage = null;
|
| Line 96... |
Line 101... |
| 96 |
private static boolean auteurStorePartageChargementOk = false;
|
101 |
private static boolean auteurStorePartageChargementOk = false;
|
| 97 |
|
102 |
|
| 98 |
private FieldSet generalitesFieldset = null;
|
103 |
private FieldSet generalitesFieldset = null;
|
| 99 |
private TextField<String> titreChp = null;
|
104 |
private TextField<String> titreChp = null;
|
| Line 100... |
Line 105... |
| 100 |
private TextField<String> collectionChp = null;
|
105 |
private TextField<String> collectionChp = null;
|
| 101 |
private TextField<String> uriChp = null;
|
106 |
private TextField<String> uriChp = null;
|
| 102 |
|
107 |
|
| 103 |
private FieldSet editionFieldset = null;
|
108 |
private FieldSet editionFieldset = null;
|
| 104 |
private ComboBox<Structure> editeurCombobox = null;
|
109 |
private ChampComboBoxRechercheTempsReelPaginable editeurCombobox = null;
|
| 105 |
private static boolean editeursOk = false;
|
110 |
private static boolean editeursOk = false;
|
| 106 |
private TextField<String> datePublicationChp = null;
|
111 |
private TextField<String> datePublicationChp = null;
|
| Line 576... |
Line 581... |
| 576 |
// Fieldset Infos Générales
|
581 |
// Fieldset Infos Générales
|
| 577 |
generalitesFieldset = new FieldSet();
|
582 |
generalitesFieldset = new FieldSet();
|
| 578 |
generalitesFieldset.setHeading("Informations générales");
|
583 |
generalitesFieldset.setHeading("Informations générales");
|
| 579 |
generalitesFieldset.setCollapsible(true);
|
584 |
generalitesFieldset.setCollapsible(true);
|
| 580 |
generalitesFieldset.setLayout(layout);
|
585 |
generalitesFieldset.setLayout(layout);
|
| - |
|
586 |
|
| - |
|
587 |
|
| - |
|
588 |
ModelType modelTypeProjets = new ModelType();
|
| - |
|
589 |
modelTypeProjets.setRoot("projets");
|
| - |
|
590 |
modelTypeProjets.setTotalName("nbElements");
|
| - |
|
591 |
modelTypeProjets.addField("cpr_nom");
|
| - |
|
592 |
modelTypeProjets.addField("cpr_id_projet");
|
| - |
|
593 |
|
| - |
|
594 |
String displayNameProjets = "cpr_nom";
|
| - |
|
595 |
ProxyProjets<ModelData> proxyProjets = new ProxyProjets<ModelData>();
|
| - |
|
596 |
|
| - |
|
597 |
projetsCombo = new ChampComboBoxRechercheTempsReelPaginable(proxyProjets, modelTypeProjets, displayNameProjets);
|
| - |
|
598 |
projetsCombo.setWidth(200, 600);
|
| - |
|
599 |
projetsCombo.getCombo().setTabIndex(tabIndex++);
|
| - |
|
600 |
projetsCombo.getCombo().setFieldLabel(i18nC.projetChamp());
|
| - |
|
601 |
projetsCombo.getCombo().setForceSelection(true);
|
| - |
|
602 |
projetsCombo.getCombo().addStyleName(ComposantClass.OBLIGATOIRE);
|
| - |
|
603 |
projetsCombo.getCombo().addListener(Events.Valid, Formulaire.creerEcouteurChampObligatoire());
|
| Line 581... |
Line -... |
| 581 |
|
- |
|
| 582 |
projetsCombo = new ComboBox<Projet>();
|
- |
|
| 583 |
projetsCombo.setTabIndex(tabIndex++);
|
- |
|
| 584 |
projetsCombo.setFieldLabel(i18nC.projetChamp());
|
- |
|
| 585 |
projetsCombo.setDisplayField("nom");
|
- |
|
| 586 |
projetsCombo.setForceSelection(true);
|
604 |
|
| 587 |
projetsCombo.setValidator(new Validator() {
|
605 |
projetsCombo.getCombo().setValidator(new Validator() {
|
| 588 |
public String validate(Field<?> field, String value) {
|
606 |
public String validate(Field<?> field, String value) {
|
| 589 |
String retour = null;
|
607 |
String retour = null;
|
| 590 |
if (field.getRawValue().equals("")) {
|
608 |
if (field.getRawValue().equals("")) {
|
| 591 |
field.setValue(null);
|
609 |
field.setValue(null);
|
| 592 |
} else if (projetsCombo.getStore().findModel("nom", field.getRawValue()) == null) {
|
610 |
} else if (projetsCombo.getStore().findModel("cpr_nom", field.getRawValue()) == null) {
|
| 593 |
String contenuBrut = field.getRawValue();
|
611 |
String contenuBrut = field.getRawValue();
|
| 594 |
field.setValue(null);
|
612 |
field.setValue(null);
|
| 595 |
field.setRawValue(contenuBrut);
|
613 |
field.setRawValue(contenuBrut);
|
| 596 |
retour = "Veuillez sélectionner une valeur ou laisser le champ vide";
|
614 |
retour = "Veuillez sélectionner une valeur ou laisser le champ vide";
|
| 597 |
}
|
615 |
}
|
| 598 |
return retour;
|
616 |
return retour;
|
| 599 |
}
|
617 |
}
|
| 600 |
});
|
- |
|
| 601 |
projetsCombo.setTriggerAction(TriggerAction.ALL);
|
- |
|
| 602 |
projetsCombo.setStore(new ListStore<Projet>());
|
- |
|
| 603 |
projetsCombo.addStyleName(ComposantClass.OBLIGATOIRE);
|
- |
|
| 604 |
projetsCombo.addListener(Events.Valid, Formulaire.creerEcouteurChampObligatoire());
|
618 |
});
|
| 605 |
generalitesFieldset.add(projetsCombo, new FormData(450, 0));
|
- |
|
| Line 606... |
Line 619... |
| 606 |
mediateur.selectionnerProjet(this, null);
|
619 |
generalitesFieldset.add(projetsCombo, new FormData(600, 0));
|
| 607 |
|
620 |
|
| 608 |
titreChp = new TextField<String>();
|
621 |
titreChp = new TextField<String>();
|
| 609 |
titreChp.setName("cpu");
|
622 |
titreChp.setName("cpu");
|
| Line 628... |
Line 641... |
| 628 |
// Fieldset Edition
|
641 |
// Fieldset Edition
|
| 629 |
editionFieldset = new FieldSet();
|
642 |
editionFieldset = new FieldSet();
|
| 630 |
editionFieldset.setHeading("Édition");
|
643 |
editionFieldset.setHeading("Édition");
|
| 631 |
editionFieldset.setCollapsible(true);
|
644 |
editionFieldset.setCollapsible(true);
|
| 632 |
editionFieldset.setLayout(layout);
|
645 |
editionFieldset.setLayout(layout);
|
| 633 |
|
646 |
|
| - |
|
647 |
/*****************************************************/
|
| - |
|
648 |
/** Champ 'Editeur de la publication' **/
|
| - |
|
649 |
/*****************************************************/
|
| 634 |
ListStore<Structure> editeurStore = new ListStore<Structure>();
|
650 |
ModelType modelTypeStructures = new ModelType();
|
| 635 |
editeurCombobox = new ComboBox<Structure>();
|
651 |
modelTypeStructures.setRoot("structures");
|
| 636 |
editeurCombobox.setEmptyText("Sélectionner un éditeur...");
|
652 |
modelTypeStructures.setTotalName("nbElements");
|
| - |
|
653 |
modelTypeStructures.addField("cs_nom");
|
| 637 |
editeurCombobox.setFieldLabel("Éditeur de la publication");
|
654 |
modelTypeStructures.addField("cs_id_structure");
|
| - |
|
655 |
|
| 638 |
editeurCombobox.setDisplayField("nom");
|
656 |
String displayNameStructures = "cs_nom";
|
| - |
|
657 |
ProxyStructures<ModelData> proxyStructures = new ProxyStructures<ModelData>();
|
| - |
|
658 |
|
| - |
|
659 |
editeurCombobox = new ChampComboBoxRechercheTempsReelPaginable(proxyStructures, modelTypeStructures, displayNameStructures);
|
| 639 |
editeurCombobox.setStore(editeurStore);
|
660 |
editeurCombobox.setWidth(200, 600);
|
| 640 |
editeurCombobox.setEditable(true);
|
661 |
editeurCombobox.getCombo().setTabIndex(tabIndex++);
|
| 641 |
editeurCombobox.setTriggerAction(TriggerAction.ALL);
|
662 |
editeurCombobox.getCombo().setEmptyText("Sélectionner un éditeur...");
|
| 642 |
editionFieldset.add(editeurCombobox, new FormData(450, 0));
|
663 |
editeurCombobox.getCombo().setFieldLabel("Éditeur de la publication");
|
| 643 |
mediateur.clicObtenirListeEditeurs(this);
|
664 |
editeurCombobox.getCombo().setEditable(true);
|
| - |
|
665 |
editionFieldset.add(editeurCombobox, new FormData(600, 0));
|
| 644 |
|
666 |
|
| - |
|
667 |
/*********************************************/
|
| - |
|
668 |
/** Champ 'Date de publication' **/
|
| - |
|
669 |
/*********************************************/
|
| 645 |
datePublicationChp = new TextField<String>();
|
670 |
datePublicationChp = new TextField<String>();
|
| 646 |
datePublicationChp.setMaxLength(4);
|
671 |
datePublicationChp.setMaxLength(4);
|
| 647 |
datePublicationChp.setMinLength(4);
|
672 |
datePublicationChp.setMinLength(4);
|
| 648 |
datePublicationChp.setFieldLabel("Année de publication");
|
673 |
datePublicationChp.setFieldLabel("Année de publication");
|
| 649 |
datePublicationChp.addStyleName(ComposantClass.OBLIGATOIRE);
|
674 |
datePublicationChp.addStyleName(ComposantClass.OBLIGATOIRE);
|
| 650 |
datePublicationChp.addListener(Events.Valid, creerEcouteurChampObligatoire());
|
675 |
datePublicationChp.addListener(Events.Valid, creerEcouteurChampObligatoire());
|
| 651 |
editionFieldset.add(datePublicationChp, new FormData(40, 0));
|
676 |
editionFieldset.add(datePublicationChp, new FormData(40, 0));
|
| Line -... |
Line 677... |
| - |
|
677 |
|
| - |
|
678 |
/*****************************/
|
| - |
|
679 |
/** Champ '' **/
|
| 652 |
|
680 |
/*****************************/
|
| 653 |
tomeChp = new TextField<String>();
|
681 |
tomeChp = new TextField<String>();
|
| 654 |
tomeChp.setFieldLabel("Série de la revue ou tome");
|
682 |
tomeChp.setFieldLabel("Série de la revue ou tome");
|
| 655 |
editionFieldset.add(tomeChp, new FormData(75, 0));
|
683 |
editionFieldset.add(tomeChp, new FormData(75, 0));
|
| - |
|
684 |
|
| - |
|
685 |
/*****************************/
|
| - |
|
686 |
/** Champ '' **/
|
| 656 |
|
687 |
/*****************************/
|
| 657 |
fasciculeChp = new TextField<String>();
|
688 |
fasciculeChp = new TextField<String>();
|
| 658 |
fasciculeChp.setFieldLabel("Fascicule de la revue");
|
689 |
fasciculeChp.setFieldLabel("Fascicule de la revue");
|
| 659 |
editionFieldset.add(fasciculeChp, new FormData(75, 0));
|
690 |
editionFieldset.add(fasciculeChp, new FormData(75, 0));
|
| - |
|
691 |
|
| - |
|
692 |
/*****************************/
|
| - |
|
693 |
/** Champ '' **/
|
| 660 |
|
694 |
/*****************************/
|
| 661 |
pagesChp = new TextField<String>();
|
695 |
pagesChp = new TextField<String>();
|
| 662 |
pagesChp.setFieldLabel("Pages");
|
696 |
pagesChp.setFieldLabel("Pages");
|
| 663 |
pagesChp.setToolTip("Fomat : NBRE ou NBRE-NBRE. ('NBRE' correspond à une suite de chiffres arabes ou romains ou à un point d'interrogation '?' dans le cas d'une donnée inconnue)");
|
697 |
pagesChp.setToolTip("Fomat : NBRE ou NBRE-NBRE. ('NBRE' correspond à une suite de chiffres arabes ou romains ou à un point d'interrogation '?' dans le cas d'une donnée inconnue)");
|
| 664 |
editionFieldset.add(pagesChp, new FormData(100, 0));
|
698 |
editionFieldset.add(pagesChp, new FormData(100, 0));
|
| Line 665... |
Line 699... |
| 665 |
}
|
699 |
}
|
| 666 |
|
700 |
|
| 667 |
public void rafraichir(Object nouvellesDonnees) {
|
701 |
public void rafraichir(Object nouvellesDonnees) {
|
| 668 |
if (nouvellesDonnees instanceof Publication) {
|
702 |
if (nouvellesDonnees instanceof Publication) {
|
| 669 |
// Si on a reçu les details d'une publication
|
- |
|
| 670 |
rafraichirPublication((Publication) nouvellesDonnees);
|
- |
|
| 671 |
} else if (nouvellesDonnees instanceof StructureListe) {
|
- |
|
| 672 |
// Si on a reçu une liste des editeurs
|
703 |
// Si on a reçu les details d'une publication
|
| 673 |
rafraichirListeEditeurs((StructureListe) nouvellesDonnees);
|
704 |
rafraichirPublication((Publication) nouvellesDonnees);
|
| 674 |
} else if (nouvellesDonnees instanceof PublicationAPersonneListe) {
|
705 |
} else if (nouvellesDonnees instanceof PublicationAPersonneListe) {
|
| 675 |
rafraichirListeAuteurs((PublicationAPersonneListe) nouvellesDonnees);
|
706 |
rafraichirListeAuteurs((PublicationAPersonneListe) nouvellesDonnees);
|
| 676 |
} else if (nouvellesDonnees instanceof Information) {
|
- |
|
| 677 |
rafraichirInformation((Information) nouvellesDonnees);
|
- |
|
| 678 |
} else if (nouvellesDonnees instanceof ProjetListe) {
|
- |
|
| 679 |
ProjetListe projets = (ProjetListe) nouvellesDonnees;
|
- |
|
| 680 |
Formulaire.rafraichirComboBox(projets, projetsCombo);
|
707 |
} else if (nouvellesDonnees instanceof Information) {
|
| 681 |
setValeurComboProjets();
|
708 |
rafraichirInformation((Information) nouvellesDonnees);
|
| 682 |
} else {
|
709 |
} else {
|
| Line 683... |
Line 710... |
| 683 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
710 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
| Line 696... |
Line 723... |
| 696 |
if (etrePretAAfficherAuteurs()) {
|
723 |
if (etrePretAAfficherAuteurs()) {
|
| 697 |
afficherAuteurs();
|
724 |
afficherAuteurs();
|
| 698 |
initialiserAffichageAuteurs();
|
725 |
initialiserAffichageAuteurs();
|
| 699 |
}
|
726 |
}
|
| Line 700... |
Line 727... |
| 700 |
|
727 |
|
| 701 |
if (etrePretAPeupler()) {
|
728 |
if (etrePretAPeupler()) {
|
| 702 |
peuplerFormulaire();
|
729 |
peuplerFormulaire();
|
| 703 |
genererTitreFormulaire();
|
730 |
genererTitreFormulaire();
|
| 704 |
initialiserPeupler();
|
731 |
initialiserPeupler();
|
| Line 734... |
Line 761... |
| 734 |
private void rafraichirPublication(Publication publi) {
|
761 |
private void rafraichirPublication(Publication publi) {
|
| 735 |
publicationOk = true;
|
762 |
publicationOk = true;
|
| 736 |
publication = publi;
|
763 |
publication = publi;
|
| 737 |
}
|
764 |
}
|
| Line 738... |
Line -... |
| 738 |
|
- |
|
| 739 |
private void rafraichirListeEditeurs(StructureListe editeurs) {
|
- |
|
| 740 |
editeursOk = true;
|
- |
|
| 741 |
editeurCombobox.getStore().removeAll();
|
- |
|
| 742 |
editeurCombobox.getStore().add((List<Structure>) editeurs.toList());
|
- |
|
| 743 |
}
|
- |
|
| 744 |
|
765 |
|
| 745 |
private void rafraichirListeAuteurs(PublicationAPersonneListe auteurs) {
|
766 |
private void rafraichirListeAuteurs(PublicationAPersonneListe auteurs) {
|
| 746 |
Iterator<String> it = auteurs.keySet().iterator();
|
767 |
Iterator<String> it = auteurs.keySet().iterator();
|
| 747 |
while (it.hasNext()) {
|
768 |
while (it.hasNext()) {
|
| 748 |
Personne auteur = auteurs.get(it.next()).getPersonne();
|
769 |
Personne auteur = auteurs.get(it.next()).getPersonne();
|
| Line 1064... |
Line 1085... |
| 1064 |
tomeChp.setValue(publication.getIndicationNvt());
|
1085 |
tomeChp.setValue(publication.getIndicationNvt());
|
| 1065 |
fasciculeChp.setValue(publication.getFascicule());
|
1086 |
fasciculeChp.setValue(publication.getFascicule());
|
| 1066 |
pagesChp.setValue(publication.getPages());
|
1087 |
pagesChp.setValue(publication.getPages());
|
| Line 1067... |
Line 1088... |
| 1067 |
|
1088 |
|
| 1068 |
if (publication.getEditeur().matches("^[0-9]+$")) {
|
1089 |
if (publication.getEditeur().matches("^[0-9]+$")) {
|
| 1069 |
editeurCombobox.setValue(editeurCombobox.getStore().findModel("id_structure", publication.getEditeur()));
|
1090 |
editeurCombobox.getCombo().setValue(editeurCombobox.getStore().findModel("cs_id_structure", publication.getEditeur()));
|
| 1070 |
} else {
|
1091 |
} else {
|
| 1071 |
editeurCombobox.setRawValue(publication.getEditeur());
|
1092 |
editeurCombobox.getCombo().setRawValue(publication.getEditeur());
|
| 1072 |
}
|
1093 |
}
|
| Line 1073... |
Line 1094... |
| 1073 |
}
|
1094 |
}
|
| Line 1088... |
Line 1109... |
| 1088 |
|
1109 |
|
| 1089 |
String uri = uriChp.getValue();
|
1110 |
String uri = uriChp.getValue();
|
| Line 1090... |
Line 1111... |
| 1090 |
publicationCollectee.setUri(uri);
|
1111 |
publicationCollectee.setUri(uri);
|
| 1091 |
|
1112 |
|
| - |
|
1113 |
String editeur = "";
|
| 1092 |
String editeur = "";
|
1114 |
if (editeurCombobox.getValeur() != null) {
|
| 1093 |
if (editeurCombobox.getValue() != null) {
|
1115 |
Structure structure = new Structure(editeurCombobox.getValeur());
|
| 1094 |
editeur = editeurCombobox.getValue().getId();
|
1116 |
editeur = structure.getId();
|
| 1095 |
publicationCollectee.setStructureEditeur(editeurCombobox.getValue());
|
1117 |
publicationCollectee.setStructureEditeur(structure);
|
| 1096 |
} else if (editeurCombobox.getRawValue() != "") {
|
1118 |
} else if (!UtilString.isEmpty(editeurCombobox.getCombo().getRawValue())) {
|
| 1097 |
editeur = editeurCombobox.getRawValue();
|
1119 |
editeur = editeurCombobox.getCombo().getRawValue();
|
| Line 1098... |
Line 1120... |
| 1098 |
}
|
1120 |
}
|
| 1099 |
publicationCollectee.setEditeur(editeur);
|
1121 |
publicationCollectee.setEditeur(editeur);
|
| Line 1118... |
Line 1140... |
| 1118 |
return publicationARetourner;
|
1140 |
return publicationARetourner;
|
| 1119 |
}
|
1141 |
}
|
| Line 1120... |
Line 1142... |
| 1120 |
|
1142 |
|
| 1121 |
private String construireIntituleEditeur() {
|
1143 |
private String construireIntituleEditeur() {
|
| 1122 |
String editeur = "";
|
1144 |
String editeur = "";
|
| - |
|
1145 |
if (editeurCombobox.getValeur() != null) {
|
| 1123 |
if (editeurCombobox.getValue() != null) {
|
1146 |
Structure structure = new Structure(editeurCombobox.getValeur());
|
| 1124 |
editeur = editeurCombobox.getValue().getNom();
|
1147 |
editeur = structure.getNom();
|
| 1125 |
} else if (editeurCombobox.getRawValue() != "") {
|
1148 |
} else if (!UtilString.isEmpty(editeurCombobox.getCombo().getRawValue())) {
|
| 1126 |
editeur = editeurCombobox.getRawValue();
|
1149 |
editeur = editeurCombobox.getCombo().getRawValue();
|
| 1127 |
}
|
1150 |
}
|
| 1128 |
return editeur;
|
1151 |
return editeur;
|
| Line 1129... |
Line 1152... |
| 1129 |
}
|
1152 |
}
|
| Line 1223... |
Line 1246... |
| 1223 |
}
|
1246 |
}
|
| 1224 |
}
|
1247 |
}
|
| Line 1225... |
Line 1248... |
| 1225 |
|
1248 |
|
| 1226 |
private String getValeurComboProjets() {
|
1249 |
private String getValeurComboProjets() {
|
| 1227 |
String valeur = "";
|
1250 |
String valeur = "";
|
| - |
|
1251 |
if (projetsCombo.getValeur() != null) {
|
| 1228 |
if (projetsCombo.getValue() != null) {
|
1252 |
Projet projet = new Projet(projetsCombo.getValeur());
|
| 1229 |
valeur = projetsCombo.getValue().getId();
|
1253 |
valeur = projet.getId();
|
| 1230 |
}
|
1254 |
}
|
| 1231 |
return valeur;
|
1255 |
return valeur;
|
| 1232 |
}
|
1256 |
}
|
| - |
|
1257 |
private void setValeurComboProjets() {
|
| 1233 |
private void setValeurComboProjets() {
|
1258 |
Debug.log("HELLO");
|
| - |
|
1259 |
if (projetsCombo.getStore() != null ) {
|
| 1234 |
if (projetsCombo.getStore() != null ) {
|
1260 |
Debug.log(projetsCombo.getStore().getModels().toArray().toString());
|
| 1235 |
if (mode.equals(Formulaire.MODE_MODIFIER) && publication != null) {
|
1261 |
if (mode.equals(Formulaire.MODE_MODIFIER) && publication != null) {
|
| 1236 |
projetsCombo.setValue(projetsCombo.getStore().findModel("id_projet", publication.getIdProjet()));
|
1262 |
projetsCombo.getCombo().setValue(projetsCombo.getStore().findModel("cpr_id_projet", publication.getIdProjet()));
|
| 1237 |
} else if (mode.equals(Formulaire.MODE_AJOUTER)) {
|
1263 |
} else if (mode.equals(Formulaire.MODE_AJOUTER)) {
|
| 1238 |
projetsCombo.setValue(projetsCombo.getStore().findModel("id_projet", mediateur.getProjetId()));
|
1264 |
projetsCombo.getCombo().setValue(projetsCombo.getStore().findModel("cpr_id_projet", mediateur.getProjetId()));
|
| 1239 |
}
|
1265 |
}
|
| 1240 |
}
|
1266 |
}
|
| 1241 |
}
|
1267 |
}
|
| 1242 |
}
|
1268 |
}
|