202,24 → 202,21 |
|
// Colonnes : |
|
TableColumn[] columns = new TableColumn[5]; |
TableColumn[] columns = new TableColumn[6]; |
|
// TODO : renderer date, alignement etc |
|
columns[0] = new TableColumn("etat","Transmis", 50); |
columns[0].setSortable(false); |
columns[0] = new TableColumn("etat","Aransmis", 50); |
|
columns[1] = new TableColumn("nom","Nom saisi", 200); |
columns[1].setSortable(false); |
columns[1] = new TableColumn("nom","Nom saisi", 250); |
|
columns[2] = new TableColumn("observation","Observation", 650); |
columns[2].setSortable(false); |
columns[2] = new TableColumn("nomr","Nom retenu", 250); |
|
columns[3] = new TableColumn("date","Date", 75); |
columns[3].setSortable(false); |
columns[3] = new TableColumn("lieu","Lieu", 350); |
|
columns[4] = new TableColumn("ordre","Ordre", 50); |
columns[4].setSortable(false); |
columns[4] = new TableColumn("date","Date", 75); |
|
columns[5] = new TableColumn("ordre","Ordre", 50); |
|
|
TableColumnModel cm = new TableColumnModel(columns); |
245,18 → 242,18 |
TableItem item=(TableItem) be.item; |
if (item!=null) { |
if (ordre==null) { // Affichage de la ligne selectionne |
ordre= (String) item.getValue(4); |
ordre= (String) item.getValue(5); |
mediator.onInventoryItemSelected(ordre); |
} |
else { |
// Si une ligne etait deja selectionne |
if (ordre.compareTo((String) item.getValue(4))==0) { // C'est la meme, on la deselectionne |
if (ordre.compareTo((String) item.getValue(5))==0) { // C'est la meme, on la deselectionne |
ordre=null; |
table.deselect(be.rowIndex); |
mediator.onInventoryItemUnselected(); |
} |
else { |
ordre= (String) item.getValue(4); // C'est une autre, on la selectionne |
ordre= (String) item.getValue(5); // C'est une autre, on la selectionne |
mediator.onInventoryItemSelected(ordre); |
} |
|
284,7 → 281,7 |
|
StringBuffer ids=new StringBuffer(); |
for (int i = 0; i < selection.length; i++) { |
ids.append((String)(((TableItem) selection[i]).getValue(4))); |
ids.append((String)(((TableItem) selection[i]).getValue(5))); |
if (i<(selection.length-1)) ids.append(","); |
} |
|
296,6 → 293,7 |
new ResponseTextHandler() { |
public void onCompletion(String str) { |
mediator.onInventoryUpdated(id_location,"all","all"); |
mediator.getEntryView().clear(); |
} |
}); |
} |
320,7 → 318,7 |
|
StringBuffer ids=new StringBuffer(); |
for (int i = 0; i < selection.length; i++) { |
ids.append((String)(((TableItem) selection[i]).getValue(4))); |
ids.append((String)(((TableItem) selection[i]).getValue(5))); |
if (i<(selection.length-1)) ids.append(","); |
} |
|
408,7 → 406,7 |
|
if ((jsonArray = jsonValue.isArray()) != null) { |
|
StringBuffer observationText=null; |
StringBuffer lieu=null; |
|
int arraySize = jsonArray.size(); |
|
416,15 → 414,13 |
if ((jsonArrayNested = jsonArray.get(i).isArray()) != null) { |
|
|
Object[] values = new Object[5]; |
Object[] values = new Object[6]; |
|
observationText=new StringBuffer(); |
|
// Statut Observation transmise ? |
|
String atransmit=((JSONString) jsonArrayNested .get(13)).stringValue(); |
|
String atransmit=((JSONString) jsonArrayNested .get(12)).stringValue(); |
|
if (atransmit.compareTo("1")==0) { |
values[0] = new Image("tela.gif"); |
} |
438,19 → 434,19 |
values[1] = new HTML("<b>"+Util.toCelString(((JSONString) jsonArrayNested .get(0)).toString())+"</b>"); |
|
|
|
// Texte decrivant l'observation |
|
|
// Nom retenu |
String aname=Util.toCelString(((JSONString) jsonArrayNested .get(2)).toString()); |
|
if (aname.compareTo("null")==0) { |
values[2] = new HTML(" "); |
} |
else { |
observationText.append(aname+", "); |
values[2] = new HTML(aname); |
} |
|
// Num nomenclatural |
/* |
String ann=((JSONString) jsonArrayNested .get(3)).stringValue(); |
|
if (ann.compareTo("0")!=0) { |
459,10 → 455,12 |
else { |
observationText.append("0-"); |
} |
*/ |
|
|
// Num Taxonomique |
|
/* |
String ant=((JSONString) jsonArrayNested .get(4)).stringValue(); |
|
if (ant.compareTo("0")!=0) { |
471,8 → 469,11 |
else { |
observationText.append("0, "); |
} |
*/ |
|
// Famille |
|
/* |
String afamily=Util.toCelString(((JSONString) jsonArrayNested .get(5)).toString()); |
|
if (afamily.compareTo("null")==0) { |
481,25 → 482,28 |
else { |
observationText.append(afamily+", "); |
} |
*/ |
|
|
// Localisation - Lieu |
|
lieu=new StringBuffer(); |
|
String aloc=Util.toCelString(((JSONString) jsonArrayNested .get(6)).toString()); |
// Localisation - Lieu |
|
if (aloc.compareTo("000null")==0) { |
if (observationText.length()==0) { |
observationText.append("Commune absente"); |
if (lieu.length()==0) { |
lieu.append("Commune absente"); |
} |
else { |
observationText.append("commune absente"); |
lieu.append("commune absente"); |
} |
} |
else { |
if (observationText.length()==0) { |
observationText.append("Commune de "+aloc); |
if (lieu.length()==0) { |
lieu.append("Commune de "+aloc); |
} |
else { |
observationText.append("commune de "+aloc); |
lieu.append("commune de "+aloc); |
} |
|
} |
510,7 → 514,7 |
// Localisation - Lieu dit |
|
if (alieudit.compareTo("000null")!=0) { |
observationText.append(", "+alieudit); |
lieu.append(", "+alieudit); |
} |
|
|
520,37 → 524,52 |
|
|
if (astation.compareTo("000null")!=0) { |
observationText.append(", "+astation); |
lieu.append(", "+astation); |
} |
|
|
// Milieu |
|
String amilieu=Util.toCelString(((JSONString) jsonArrayNested .get(11)).toString()); |
|
|
if (amilieu.compareTo("000null")!=0) { |
lieu.append(", "+amilieu); |
} |
|
String acomment=Util.toCelString(((JSONString) jsonArrayNested .get(11)).toString()); |
String acomment=Util.toCelString(((JSONString) jsonArrayNested .get(12)).toString()); |
// Commentaire |
|
if (acomment.compareTo("null")!=0) { |
observationText.append(", "+acomment); |
lieu.append(", "+acomment); |
} |
|
|
if (lieu.toString().compareTo("")==0) { |
values[3] = new HTML(" "); |
} |
else { |
values[3] = new HTML(lieu.toString()); |
} |
|
|
String adate=((JSONString) jsonArrayNested .get(8)).stringValue(); |
|
// Date |
if (adate.compareTo("0000-00-00 00:00:00")!=0) { |
values[3]=new HTML("<b>"+adate+"</b>"); |
values[4]=new HTML("<b>"+adate+"</b>"); |
} |
else { |
values[3] = new HTML(" "); |
values[4] = new HTML(" "); |
} |
|
|
|
values[2] = observationText; |
|
String aordre=((JSONString) jsonArrayNested.get(7)).stringValue(); |
|
// Numero d'ordre (cache) |
|
values[4] = aordre; |
values[5] = aordre; |
|
|
|
566,6 → 585,7 |
item.setValue(2,values[2]); |
item.setValue(3,values[3]); |
item.setValue(4,values[4]); |
item.setValue(5,values[5]); |
} |
|
// Spagetti |
712,7 → 732,7 |
|
|
/* |
* Station en cours |
* Lieudit en cours |
* |
*/ |
|
874,6 → 894,9 |
|
/* +--Fin du code ---------------------------------------------------------------------------------------+ |
* $Log$ |
* Revision 1.2 2008-01-30 08:55:40 ddelon |
* fin mise en place mygwt |
* |
* Revision 1.1 2008-01-02 21:26:04 ddelon |
* mise en place mygwt |
* |