Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 86 → Rev 87

/trunk/src/org/tela_botanica/client/vues/ArbreEntiteGeographiqueObservationFiltreVue.java
16,11 → 16,13
import com.gwtext.client.data.Node;
import com.gwtext.client.data.NodeTraversalCallback;
import com.gwtext.client.data.Tree;
import com.gwtext.client.data.event.NodeListenerAdapter;
import com.gwtext.client.widgets.Component;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.event.PanelListenerAdapter;
import com.gwtext.client.widgets.tree.TreeNode;
import com.gwtext.client.widgets.tree.TreePanel;
import com.gwtext.client.widgets.tree.event.TreeNodeListenerAdapter;
import com.gwtext.client.widgets.tree.event.TreePanelListenerAdapter;
import com.gwtext.client.core.EventObject;
 
66,8 → 68,6
* booléen d'etat
*/
private boolean filtreModifie = false;
 
private String[] valeursFiltrees = null ;
private boolean arbreCharge = false ;
 
168,6 → 168,9
public void onClick(TreeNode node, EventObject e) {
nomFiltre = "" ;
entitesGeographiquesEncours = "" ;
String nomPere = "" ;
String nomGrandPere = "" ;
switch(node.getDepth())
{
179,29 → 182,25
}
else
{
entitesGeographiquesEncours = "" ;
observationMediateur.obtenirNombreObservation() ;
}
return ;
case 1: nomFiltre = "id_location";
case 3: nomFiltre += "lieudit,location,id_location";
nomPere = ((String[])node.getParentNode().getUserObject())[0] ;
nomGrandPere = ((String[])node.getParentNode().getParentNode().getUserObject())[0] ;
entitesGeographiquesEncours += node.getText()+","+nomPere+","+nomGrandPere ;
break;
case 2: nomFiltre = "location";
case 2: nomFiltre += "location,id_location";
nomPere = ((String[])node.getParentNode().getUserObject())[0] ;
entitesGeographiquesEncours += node.getText()+","+nomPere ;
break;
case 3: nomFiltre = "lieudit";
case 1: nomFiltre += "id_location";
entitesGeographiquesEncours += node.getText() ;
break;
default:
break;
}
if(node.getText().equals("Inconnue"))
{
entitesGeographiquesEncours = "000null" ;
}
else
{
entitesGeographiquesEncours = node.getText() ;
}
//Window.alert("Les entités sont : "+entitesGeographiquesEncours) ;
filtreModifie = true ;
observationMediateur.obtenirNombreObservation() ;
208,6 → 207,18
}
}) ;
arbreEntitesGeographiques.getRootNode().addListener(new TreeNodeListenerAdapter() {
public void onExpand(Node node) {
if(!arbreCharge)
{
observationMediateur.obtenirListeEntiteGeographique() ;
arbreCharge = true ;
}
}
}) ;
}
 
/**
219,8 → 230,6
 
if (nouvelleDonnees instanceof ListeEntiteGeographiqueObservation) {
String entite=null;
String idEntite=null;
String idParent=null;