Line 22... |
Line 22... |
22 |
import org.tela_botanica.client.modeles.structure.Structure;
|
22 |
import org.tela_botanica.client.modeles.structure.Structure;
|
23 |
import org.tela_botanica.client.modeles.structure.StructureAPersonne;
|
23 |
import org.tela_botanica.client.modeles.structure.StructureAPersonne;
|
24 |
import org.tela_botanica.client.modeles.structure.StructureAPersonneListe;
|
24 |
import org.tela_botanica.client.modeles.structure.StructureAPersonneListe;
|
25 |
import org.tela_botanica.client.modeles.structure.StructureConservation;
|
25 |
import org.tela_botanica.client.modeles.structure.StructureConservation;
|
26 |
import org.tela_botanica.client.modeles.structure.StructureValorisation;
|
26 |
import org.tela_botanica.client.modeles.structure.StructureValorisation;
|
- |
|
27 |
import org.tela_botanica.client.util.Pattern;
|
27 |
import org.tela_botanica.client.util.UtilArray;
|
28 |
import org.tela_botanica.client.util.UtilArray;
|
28 |
import org.tela_botanica.client.util.UtilString;
|
29 |
import org.tela_botanica.client.util.UtilString;
|
29 |
import org.tela_botanica.client.vues.Formulaire;
|
30 |
import org.tela_botanica.client.vues.Formulaire;
|
Line 30... |
Line 31... |
30 |
|
31 |
|
Line 111... |
Line 112... |
111 |
private TextField<String> ihChp = null;
|
112 |
private TextField<String> ihChp = null;
|
112 |
private TextField<String> mnhnChp = null;
|
113 |
private TextField<String> mnhnChp = null;
|
113 |
private ComboBox<InterneValeur> comboTypeStructure = null;
|
114 |
private ComboBox<InterneValeur> comboTypeStructure = null;
|
114 |
private TextField<String> nomStructureChp = null;
|
115 |
private TextField<String> nomStructureChp = null;
|
115 |
private DateField dateFondationChp = null;
|
116 |
private DateField dateFondationChp = null;
|
- |
|
117 |
private TextArea descriptionChp = null;
|
- |
|
118 |
private TextArea conditionAccesChp = null;
|
- |
|
119 |
private TextArea conditionUsageChp = null;
|
116 |
private TextArea adrChp = null;
|
120 |
private TextArea adrChp = null;
|
- |
|
121 |
private TextArea adrComplementChp = null;
|
117 |
private TextField<String> cpChp = null;
|
122 |
private TextField<String> cpChp = null;
|
118 |
private TextField<String> villeChp = null;
|
123 |
private TextField<String> villeChp = null;
|
- |
|
124 |
private ListStore<Valeur> magazinRegion = null;
|
119 |
private ComboBox<Valeur> comboRegion = null;
|
125 |
private ComboBox<Valeur> comboRegion = null;
|
- |
|
126 |
private ListStore<Valeur> magazinPays = null;
|
- |
|
127 |
private ComboBox<Valeur> comboPays = null;
|
- |
|
128 |
private TextField<String> latitudeChp = null;
|
- |
|
129 |
private TextField<String> longitudeChp = null;
|
120 |
private TextField<String> telChp = null;
|
130 |
private TextField<String> telChp = null;
|
121 |
private TextField<String> faxChp = null;
|
131 |
private TextField<String> faxChp = null;
|
122 |
private TextField<String> emailChp = null;
|
132 |
private TextField<String> emailChp = null;
|
123 |
private TextField<String> urlChp = null;
|
133 |
private TextField<String> urlChp = null;
|
124 |
private ListStore<Valeur> magazinPays = null;
|
- |
|
125 |
private ListStore<Valeur> magazinRegion = null;
|
- |
|
126 |
private ComboBox<Valeur> comboPays = null;
|
- |
|
Line 127... |
Line 134... |
127 |
|
134 |
|
128 |
// Onglet PERSONNEL
|
135 |
// Onglet PERSONNEL
|
129 |
private StructureAPersonneListe personnel = null;
|
136 |
private StructureAPersonneListe personnel = null;
|
130 |
private StructureAPersonneListe personnelAjoute = null;
|
137 |
private StructureAPersonneListe personnelAjoute = null;
|
Line 646... |
Line 653... |
646 |
structureCollectee.setTypePrive(comboLstpr.getValue().getId());
|
653 |
structureCollectee.setTypePrive(comboLstpr.getValue().getId());
|
647 |
}
|
654 |
}
|
648 |
}
|
655 |
}
|
649 |
structureCollectee.setDateFondation(dateFondationChp.getValue());
|
656 |
structureCollectee.setDateFondation(dateFondationChp.getValue());
|
Line -... |
Line 657... |
- |
|
657 |
|
- |
|
658 |
structureCollectee.setDescription(descriptionChp.getValue());
|
- |
|
659 |
structureCollectee.setConditionAcces(conditionAccesChp.getValue());
|
- |
|
660 |
structureCollectee.setConditionUsage(conditionUsageChp.getValue());
|
650 |
|
661 |
|
- |
|
662 |
structureCollectee.setAdresse(adrChp.getValue());
|
651 |
structureCollectee.setAdresse(adrChp.getValue());
|
663 |
structureCollectee.setAdresseComplement(adrComplementChp.getValue());
|
652 |
structureCollectee.setCodePostal(cpChp.getValue());
|
664 |
structureCollectee.setCodePostal(cpChp.getValue());
|
Line 653... |
Line 665... |
653 |
structureCollectee.setVille(villeChp.getValue());
|
665 |
structureCollectee.setVille(villeChp.getValue());
|
654 |
|
666 |
|
Line 665... |
Line 677... |
665 |
if (comboPays.getValue() != null) {
|
677 |
if (comboPays.getValue() != null) {
|
666 |
structureCollectee.setPays(comboPays.getValue().getId());
|
678 |
structureCollectee.setPays(comboPays.getValue().getId());
|
667 |
} else if (comboPays.getRawValue() != "") {
|
679 |
} else if (comboPays.getRawValue() != "") {
|
668 |
structureCollectee.setPays(comboPays.getRawValue());
|
680 |
structureCollectee.setPays(comboPays.getRawValue());
|
669 |
}
|
681 |
}
|
- |
|
682 |
structureCollectee.setLatitude(latitudeChp.getValue());
|
- |
|
683 |
structureCollectee.setLongitude(longitudeChp.getValue());
|
Line 670... |
Line 684... |
670 |
|
684 |
|
671 |
structureCollectee.setTelephoneFixe(telChp.getValue());
|
685 |
structureCollectee.setTelephoneFixe(telChp.getValue());
|
672 |
structureCollectee.setFax(faxChp.getValue());
|
686 |
structureCollectee.setFax(faxChp.getValue());
|
673 |
structureCollectee.setCourriel(emailChp.getValue());
|
687 |
structureCollectee.setCourriel(emailChp.getValue());
|
Line 733... |
Line 747... |
733 |
comboLstpu.setValue(comboLstpu.getStore().findModel("id_valeur", identification.getTypePublic()));
|
747 |
comboLstpu.setValue(comboLstpu.getStore().findModel("id_valeur", identification.getTypePublic()));
|
734 |
}
|
748 |
}
|
735 |
}
|
749 |
}
|
736 |
dateFondationChp.setValue(identification.getDateFondation());
|
750 |
dateFondationChp.setValue(identification.getDateFondation());
|
Line -... |
Line 751... |
- |
|
751 |
|
- |
|
752 |
descriptionChp.setValue(identification.getDescription());
|
- |
|
753 |
conditionAccesChp.setValue(identification.getConditionAcces());
|
- |
|
754 |
conditionUsageChp.setValue(identification.getConditionUsage());
|
737 |
|
755 |
|
- |
|
756 |
adrChp.setValue(identification.getAdresse());
|
738 |
adrChp.setValue(identification.getAdresse());
|
757 |
adrComplementChp.setValue(identification.getAdresseComplement());
|
739 |
cpChp.setValue(identification.getCodePostal());
|
758 |
cpChp.setValue(identification.getCodePostal());
|
740 |
villeChp.setValue(identification.getVille());
|
759 |
villeChp.setValue(identification.getVille());
|
741 |
mettreAJourRegion();
|
760 |
mettreAJourRegion();
|
742 |
//(identification.getRegion());
|
761 |
//(identification.getRegion());
|
743 |
if (identification.getPays().matches("^[0-9]+$")) {
|
762 |
if (identification.getPays().matches("^[0-9]+$")) {
|
744 |
comboPays.setValue(comboPays.getStore().findModel("id_valeur", identification.getPays()));
|
763 |
comboPays.setValue(comboPays.getStore().findModel("id_valeur", identification.getPays()));
|
745 |
} else {
|
764 |
} else {
|
746 |
comboPays.setRawValue(identification.getPays());
|
765 |
comboPays.setRawValue(identification.getPays());
|
- |
|
766 |
}
|
- |
|
767 |
latitudeChp.setValue(identification.getLatitude());
|
Line 747... |
Line 768... |
747 |
}
|
768 |
longitudeChp.setValue(identification.getLongitude());
|
748 |
|
769 |
|
749 |
telChp.setValue(identification.getTelephoneFixe());
|
770 |
telChp.setValue(identification.getTelephoneFixe());
|
750 |
faxChp.setValue(identification.getFax());
|
771 |
faxChp.setValue(identification.getFax());
|
Line 1629... |
Line 1650... |
1629 |
fieldSetIdentite.add(nbreTotalPersonneStructureChp);
|
1650 |
fieldSetIdentite.add(nbreTotalPersonneStructureChp);
|
Line 1630... |
Line 1651... |
1630 |
|
1651 |
|
Line 1631... |
Line 1652... |
1631 |
identificationOnglet.add(fieldSetIdentite);
|
1652 |
identificationOnglet.add(fieldSetIdentite);
|
- |
|
1653 |
|
- |
|
1654 |
//+-----------------------------------------------------------------------------------------------------------+
|
- |
|
1655 |
// Fieldset DESCRIPTION
|
- |
|
1656 |
FieldSet fieldSetDescription = new FieldSet();
|
- |
|
1657 |
fieldSetDescription.setHeading("Description");
|
- |
|
1658 |
fieldSetDescription.setCollapsible(true);
|
- |
|
1659 |
fieldSetDescription.setLayout(creerFormLayout(120, LabelAlign.LEFT));
|
- |
|
1660 |
|
- |
|
1661 |
descriptionChp = new TextArea();
|
- |
|
1662 |
descriptionChp.setTabIndex(tabIndex++);
|
- |
|
1663 |
descriptionChp.setFieldLabel("Description");
|
- |
|
1664 |
fieldSetDescription.add(descriptionChp, new FormData(550, 0));
|
- |
|
1665 |
|
- |
|
1666 |
conditionAccesChp = new TextArea();
|
- |
|
1667 |
conditionAccesChp.setTabIndex(tabIndex++);
|
- |
|
1668 |
conditionAccesChp.setFieldLabel("Conditions d'accès");
|
- |
|
1669 |
fieldSetDescription.add(conditionAccesChp, new FormData(550, 0));
|
- |
|
1670 |
|
- |
|
1671 |
conditionUsageChp = new TextArea();
|
- |
|
1672 |
conditionUsageChp.setTabIndex(tabIndex++);
|
- |
|
1673 |
conditionUsageChp.setFieldLabel("Conditions d'usage");
|
- |
|
1674 |
fieldSetDescription.add(conditionUsageChp, new FormData(550, 0));
|
- |
|
1675 |
|
- |
|
1676 |
identificationOnglet.add(fieldSetDescription);
|
1632 |
|
1677 |
|
1633 |
//+-----------------------------------------------------------------------------------------------------------+
|
1678 |
//+-----------------------------------------------------------------------------------------------------------+
|
1634 |
// Fieldset ADRESSE
|
1679 |
// Fieldset ADRESSE
|
1635 |
LayoutContainer principalFdAdresse = new LayoutContainer();
|
1680 |
LayoutContainer principalFdAdresse = new LayoutContainer();
|
Line 1648... |
Line 1693... |
1648 |
|
1693 |
|
Line 1649... |
Line 1694... |
1649 |
fieldSetAdresse.setLayout(creerFormLayout(null, LabelAlign.LEFT));
|
1694 |
fieldSetAdresse.setLayout(creerFormLayout(null, LabelAlign.LEFT));
|
1650 |
|
1695 |
|
1651 |
adrChp = new TextArea();
|
1696 |
adrChp = new TextArea();
|
1652 |
adrChp.setTabIndex(tabIndex++);
|
1697 |
adrChp.setTabIndex(tabIndex++);
|
Line -... |
Line 1698... |
- |
|
1698 |
adrChp.setFieldLabel("Adresse (Nom du batiment, rue...)");
|
- |
|
1699 |
fieldSetAdresse.add(adrChp, new FormData(550, 0));
|
- |
|
1700 |
|
- |
|
1701 |
adrComplementChp = new TextArea();
|
- |
|
1702 |
adrComplementChp.setTabIndex(tabIndex++);
|
1653 |
adrChp.setFieldLabel("Adresse");
|
1703 |
adrComplementChp.setFieldLabel("Complément d'adresse (BP, étage...)");
|
1654 |
fieldSetAdresse.add(adrChp, new FormData(550, 0));
|
1704 |
fieldSetAdresse.add(adrComplementChp, new FormData(550, 0));
|
1655 |
|
1705 |
|
1656 |
cpChp = new TextField<String>();
|
1706 |
cpChp = new TextField<String>();
|
Line 1699... |
Line 1749... |
1699 |
comboRegion.setTriggerAction(TriggerAction.ALL);
|
1749 |
comboRegion.setTriggerAction(TriggerAction.ALL);
|
1700 |
comboRegion.setStore(magazinRegion);
|
1750 |
comboRegion.setStore(magazinRegion);
|
Line 1701... |
Line 1751... |
1701 |
|
1751 |
|
Line -... |
Line 1752... |
- |
|
1752 |
droiteFdAdresse.add(comboRegion, new FormData("95%"));
|
- |
|
1753 |
|
- |
|
1754 |
latitudeChp = new TextField<String>();
|
- |
|
1755 |
latitudeChp.setRegex(Pattern.latitude);
|
- |
|
1756 |
latitudeChp.setToolTip("Format : nombre décimal positif ou négatif de 0 à 90.");
|
- |
|
1757 |
latitudeChp.getMessages().setRegexText("La valeur saisie n'est pas une latitude valide. Exemples de latitude : -45,302010 ou 45.252423 ou 25,16.");
|
- |
|
1758 |
latitudeChp.setTabIndex(tabIndex++);
|
- |
|
1759 |
latitudeChp.setFieldLabel("Latitude (Nord)");
|
- |
|
1760 |
gaucheFdAdresse.add(latitudeChp, new FormData("95%"));
|
- |
|
1761 |
|
- |
|
1762 |
longitudeChp = new TextField<String>();
|
- |
|
1763 |
longitudeChp.setRegex(Pattern.longitude);
|
- |
|
1764 |
longitudeChp.setToolTip("Format : nombre décimal positif ou négatif de 0 à 180.");
|
- |
|
1765 |
longitudeChp.getMessages().setRegexText("La valeur saisie n'est pas une longitude valide. Exemples de longitude : -150,302010 ou 150.252423 ou 25,16.");
|
- |
|
1766 |
longitudeChp.setTabIndex(tabIndex++);
|
Line 1702... |
Line 1767... |
1702 |
droiteFdAdresse.add(comboRegion, new FormData("95%"));
|
1767 |
longitudeChp.setFieldLabel("Longitude (Est)");
|
1703 |
|
1768 |
droiteFdAdresse.add(longitudeChp, new FormData("95%"));
|
1704 |
|
1769 |
|