44,16 → 44,6 |
|
import org.tela_botanica.client.modeles.Observation; |
|
import net.mygwt.ui.client.Events; |
import net.mygwt.ui.client.Style; |
import net.mygwt.ui.client.event.BaseEvent; |
import net.mygwt.ui.client.event.Listener; |
import net.mygwt.ui.client.widget.ContentPanel; |
import net.mygwt.ui.client.widget.layout.FillLayout; |
import net.mygwt.ui.client.widget.table.Table; |
import net.mygwt.ui.client.widget.table.TableColumn; |
import net.mygwt.ui.client.widget.table.TableColumnModel; |
import net.mygwt.ui.client.widget.table.TableItem; |
|
import com.google.gwt.user.client.HTTPRequest; |
import com.google.gwt.user.client.ResponseTextHandler; |
68,7 → 58,7 |
import com.google.gwt.user.client.ui.HasVerticalAlignment; |
|
|
public class ListeObservationsVue extends Composite implements Listener |
public class ListeObservationsVue extends Composite |
{ |
|
// Debut Barre de navigation |
140,8 → 130,8 |
// Fin Barre de navigation |
|
// Conteneur (header et table sont dans panel) |
private ContentPanel panel =null; |
private Table table = null; |
// private ContentPanel panel =null; |
// private Table table = null; |
|
// Services |
private String serviceBaseUrl = null; |
176,14 → 166,14 |
this.observationMediateur=observationMediateur; |
|
|
panel= new ContentPanel(Style.HEADER); |
panel.setLayout(new FillLayout()); |
// panel= new ContentPanel(Style.HEADER); |
// panel.setLayout(new FillLayout()); |
|
|
// Barre navigation integree au header |
|
navBar = new NavBar(); |
panel.getHeader().addWidget(navBar); |
// panel.getHeader().addWidget(navBar); |
|
|
// Contenu : |
191,10 → 181,10 |
|
// Colonnes : |
|
TableColumn[] columns = new TableColumn[6]; |
// TableColumn[] columns = new TableColumn[6]; |
|
// TODO : renderer date, alignement etc |
|
/* |
columns[0] = new TableColumn("etat","Aransmis", 50); |
|
columns[1] = new TableColumn("nom","Nom saisi", 250); |
246,9 → 236,9 |
} |
} |
}); |
|
*/ |
|
initWidget(panel); |
// initWidget(panel); |
|
|
} |
260,7 → 250,7 |
*/ |
|
public void deleteElement() { |
|
/* |
setStatusDisabled(); |
TableItem[] selection=table.getSelection(); |
|
284,7 → 274,7 |
} |
|
setStatusEnabled(); |
|
*/ |
} |
|
|
299,7 → 289,7 |
|
setStatusDisabled(); |
|
TableItem[] selection=table.getSelection(); |
/* TableItem[] selection=table.getSelection(); |
|
StringBuffer ids=new StringBuffer(); |
for (int i = 0; i < selection.length; i++) { |
306,7 → 296,7 |
ids.append((String)(((TableItem) selection[i]).getValue(5))); |
if (i<(selection.length-1)) ids.append(","); |
} |
|
|
if (ids.length()>0) { |
|
HTTPRequest.asyncPost(serviceBaseUrl + "/InventoryTransmit/" + user |
321,7 → 311,7 |
|
setStatusEnabled(); |
|
|
*/ |
} |
|
|
334,7 → 324,7 |
|
setStatusDisabled(); |
|
observationMediateur.addListener(ObservationMediateur.NOMBRE_OBSERVATION,this); |
// observationMediateur.addListener(ObservationMediateur.NOMBRE_OBSERVATION,this); |
observationMediateur.getNombreObservation(identifiantLocalite,localite,annee, mois, jour ,lieudit,rechercheLibre); // Retour dans handlevent() NOMBRE_OBSERVATION |
|
|
349,7 → 339,7 |
|
public void getListeObservation() { |
|
observationMediateur.addListener(ObservationMediateur.LISTE_OBSERVATION,this); |
// observationMediateur.addListener(ObservationMediateur.LISTE_OBSERVATION,this); |
observationMediateur.getListeObservation(identifiantLocalite,localite,annee, mois, jour ,lieudit,rechercheLibre, startIndex, VISIBLE_TAXON_COUNT); // Retour dans handlevent() LISTE_OBSERVATION |
|
} |
368,7 → 358,7 |
values[5]="5"; |
values[1]=listeObservation[i].getNomSaisi(); |
|
table.add(new TableItem(values)); |
// table.add(new TableItem(values)); |
|
} |
|
870,7 → 860,7 |
} |
|
|
panel.getHeader().setText(dep + com + lieu + dat); |
//panel.getHeader().setText(dep + com + lieu + dat); |
|
|
|
884,7 → 874,7 |
* Evenements |
* |
*/ |
|
/* |
public void handleEvent(BaseEvent be) { |
switch (be.type) { |
case ObservationMediateur.NOMBRE_OBSERVATION: |
896,13 → 886,16 |
break; |
} |
} |
*/ |
|
|
|
} |
|
/* +--Fin du code ---------------------------------------------------------------------------------------+ |
* $Log$ |
* Revision 1.1 2008-06-09 14:19:37 ddelon |
* Initialisation observation |
* |
* Revision 1.3 2008-04-28 13:10:43 ddelon |
* Integration MyGwt |
* |