Subversion Repositories eFlore/Archives.cel-v1

Compare Revisions

Ignore whitespace Rev 26 → Rev 27

/trunk/src/org/tela_botanica/client/InventoryItemList.java
291,15 → 291,15
if ((jsonArray = jsonValue.isArray()) != null) {
// Nom retenu, Num Nomen nom retenu, Num Taxon, Famille
updateElement(inventoryItem.getOrdre(),inventoryItem.getName(), inventoryItem.getNomenclaturalNumber(),
((JSONString) jsonArray.get(0))
.stringValue(),
Util.toCelString(((JSONString) jsonArray.get(0))
.toString()),
((JSONString) jsonArray.get(1))
.stringValue(),
((JSONString) jsonArray.get(2))
.stringValue(),
((JSONString) jsonArray.get(3))
.stringValue(),
inventoryItem.getLocation(),inventoryItem.getLocation_id(),inventoryItem.getDate(),inventoryItem.getComplementlocation(),inventoryItem.getComment());
Util.toCelString(((JSONString) jsonArray.get(3))
.toString()),
inventoryItem.getLocation(),inventoryItem.getLocation_id(),inventoryItem.getDate(),inventoryItem.getMilieu(),inventoryItem.getComment());
}
}
307,7 → 307,7
}
// Modification d'un nom ne faisant pas parti du referentiel (saisie libre)
else {
updateElement(inventoryItem.getOrdre(),inventoryItem.getName(), " ", " ", " ", " ", " ",inventoryItem.getLocation(),inventoryItem.getLocation_id(),inventoryItem.getDate(),inventoryItem.getComplementlocation(),inventoryItem.getComment());
updateElement(inventoryItem.getOrdre(),inventoryItem.getName(), " ", " ", " ", " ", " ",inventoryItem.getLocation(),inventoryItem.getLocation_id(),inventoryItem.getDate(),inventoryItem.getMilieu(),inventoryItem.getComment());
}
}
349,15 → 349,15
// Nom retenu, Num Nomen nom retenu, Num Taxon,
// Famille
addElement(inventoryItem.getName(), inventoryItem.getNomenclaturalNumber(),
((JSONString) jsonArray.get(0))
.stringValue(),
Util.toCelString(((JSONString) jsonArray.get(0))
.toString()),
((JSONString) jsonArray.get(1))
.stringValue(),
((JSONString) jsonArray.get(2))
.stringValue(),
((JSONString) jsonArray.get(3))
.stringValue(),
inventoryItem.getLocation(),inventoryItem.getLocation_id(),inventoryItem.getDate(),inventoryItem.getComplementlocation(),inventoryItem.getComment());
Util.toCelString(((JSONString) jsonArray.get(3))
.toString()),
inventoryItem.getLocation(),inventoryItem.getLocation_id(),inventoryItem.getDate(),inventoryItem.getMilieu(),inventoryItem.getComment());
}
}
365,7 → 365,7
}
// Saisie libre
else {
addElement(inventoryItem.getName(), " ", " ", " ", " ", " ",inventoryItem.getLocation(),inventoryItem.getLocation_id(),inventoryItem.getDate(),inventoryItem.getComplementlocation(),inventoryItem.getComment());
addElement(inventoryItem.getName(), " ", " ", " ", " ", " ",inventoryItem.getLocation(),inventoryItem.getLocation_id(),inventoryItem.getDate(),inventoryItem.getMilieu(),inventoryItem.getComment());
}
}
395,15 → 395,15
*/
 
private void addElement(String nom_sel, String num_nom_sel, String nom_ret,
String num_nom_ret, String num_taxon, String famille,final String loc, String id_location,String dat, String complementLocation, String comment) {
String num_nom_ret, String num_taxon, String famille,final String loc, String id_location,String dat, String milieu, String comment) {
 
 
count++;
HTTPRequest.asyncPost(serviceBaseUrl + "/Inventory/", "identifiant="
+ user + "&nom_sel=" + nom_sel + "&num_nom_sel=" + num_nom_sel
+ "&nom_ret=" + nom_ret + "&num_nom_ret=" + num_nom_ret
+ "&num_taxon=" + num_taxon + "&famille=" + famille + "&location=" + loc + "&id_location=" + id_location + "&date_observation=" + dat
+ "&station="+ complementLocation + "&commentaire="+ comment,
+ user + "&nom_sel=" + URL.encodeComponent(nom_sel) + "&num_nom_sel=" + num_nom_sel
+ "&nom_ret=" + URL.encodeComponent(nom_ret) + "&num_nom_ret=" + num_nom_ret
+ "&num_taxon=" + num_taxon + "&famille=" + URL.encodeComponent(famille) + "&location=" + URL.encodeComponent(loc) + "&id_location=" + id_location + "&date_observation=" + dat
+ "&station="+ URL.encodeComponent(milieu) + "&commentaire="+ URL.encodeComponent(comment),
 
new ResponseTextHandler() {
 
438,14 → 438,14
*/
 
private void updateElement(String ordre, String nom_sel, String num_nom_sel, String nom_ret,
String num_nom_ret, String num_taxon, String famille,final String loc, String id_location,String dat, String complementLocation, String comment) {
String num_nom_ret, String num_taxon, String famille,final String loc, String id_location,String dat, String milieu, String comment) {
 
 
HTTPRequest.asyncPost(serviceBaseUrl + "/Inventory/" + user + "/" +ordre + "/",
"&nom_sel=" + nom_sel + "&num_nom_sel=" + num_nom_sel
+ "&nom_ret=" + nom_ret + "&num_nom_ret=" + num_nom_ret
+ "&num_taxon=" + num_taxon + "&famille=" + famille + "&location=" + loc + "&id_location=" + id_location + "&date_observation=" + dat
+ "&station="+ complementLocation + "&commentaire="+ comment,
"&nom_sel=" + URL.encodeComponent(nom_sel) + "&num_nom_sel=" + num_nom_sel
+ "&nom_ret=" + URL.encodeComponent(nom_ret) + "&num_nom_ret=" + num_nom_ret
+ "&num_taxon=" + num_taxon + "&famille=" + URL.encodeComponent(famille) + "&location=" + URL.encodeComponent(loc) + "&id_location=" + id_location + "&date_observation=" + dat
+ "&station="+ URL.encodeComponent(milieu) + "&commentaire="+ URL.encodeComponent(comment),
 
new ResponseTextHandler() {
 
631,7 → 631,7
adate=date.substring(6,10)+"-"+date.substring(3,5)+"-"+date.substring(0,2)+" 00:00:00";
}
 
HTTPRequest.asyncGet(serviceBaseUrl + "/InventoryItemList/" + user + "/" + URL.encodeComponent(location) +"/" + adate + "/" + search + "/" + URL.encodeComponent(station) + "/"
HTTPRequest.asyncGet(serviceBaseUrl + "/InventoryItemList/" + user + "/" + URL.encodeComponent(location) +"/" + adate + "/" + URL.encodeComponent(search) + "/" + URL.encodeComponent(station) + "/"
+ startIndex + "/" + VISIBLE_TAXON_COUNT,
 
new ResponseTextHandler() {
655,6 → 655,7
for (i = 0; i < arraySize; ++i) {
if ((jsonArrayNested = jsonArray.get(i).isArray()) != null) {
// Optimisation
if (i>=table.getRowCount()) {
row = table.insertRow(table.getRowCount());
}
670,7 → 671,7
table.setWidget(row, 0, new CheckBox());
// Observation transmise
// Statut Observation transmise ?
String atransmit=((JSONString) jsonArrayNested .get(11)).stringValue();
681,11 → 682,13
else {
table.setWidget(row,1,new HTML("&nbsp;"));
}
// Nom saisi
left.append("<b>"+((JSONString) jsonArrayNested .get(0)).stringValue()+"</b>");
left.append("<b>"+Util.toCelString(((JSONString) jsonArrayNested .get(0)).toString())+"</b>");
// Nom retenu
String aname=((JSONString) jsonArrayNested .get(2)).stringValue();
String aname=Util.toCelString(((JSONString) jsonArrayNested .get(2)).toString());
if (aname.compareTo("null")==0) {
}
716,7 → 719,7
}
 
// Famille
String afamily=((JSONString) jsonArrayNested .get(5)).stringValue();
String afamily=Util.toCelString(((JSONString) jsonArrayNested .get(5)).toString());
if (afamily.compareTo("null")==0) {
//
726,7 → 729,7
}
 
String aloc=((JSONString) jsonArrayNested .get(6)).stringValue();
String aloc=Util.toCelString(((JSONString) jsonArrayNested .get(6)).toString());
// Localisation - Lieu
if (aloc.compareTo("000null")==0) {
748,7 → 751,7
}
String alieudit=((JSONString) jsonArrayNested .get(9)).stringValue();
String alieudit=Util.toCelString(((JSONString) jsonArrayNested .get(9)).toString());
// Localisation - Lieu dit
756,7 → 759,7
center.append(", "+alieudit);
}
String acomment=((JSONString) jsonArrayNested .get(10)).stringValue();
String acomment=Util.toCelString(((JSONString) jsonArrayNested .get(10)).toString());
// Commentaire
if (acomment.compareTo("null")!=0) {
1057,5 → 1060,8
}
 
/* +--Fin du code ---------------------------------------------------------------------------------------+
* $Log$
* $Log$
* Revision 1.7 2007-09-17 19:25:34 ddelon
* Documentation
*
*/