44,6 → 44,16 |
|
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; |
58,7 → 68,7 |
import com.google.gwt.user.client.ui.HasVerticalAlignment; |
|
|
public class ListeObservationsVue extends Composite |
public class ListeObservationsVue extends Composite implements Listener |
{ |
|
// Debut Barre de navigation |
130,8 → 140,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; |
166,14 → 176,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 : |
181,10 → 191,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); |
236,9 → 246,9 |
} |
} |
}); |
*/ |
|
|
// initWidget(panel); |
initWidget(panel); |
|
|
} |
250,7 → 260,7 |
*/ |
|
public void deleteElement() { |
/* |
|
setStatusDisabled(); |
TableItem[] selection=table.getSelection(); |
|
274,7 → 284,7 |
} |
|
setStatusEnabled(); |
*/ |
|
} |
|
|
289,7 → 299,7 |
|
setStatusDisabled(); |
|
/* TableItem[] selection=table.getSelection(); |
TableItem[] selection=table.getSelection(); |
|
StringBuffer ids=new StringBuffer(); |
for (int i = 0; i < selection.length; i++) { |
296,7 → 306,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 |
311,7 → 321,7 |
|
setStatusEnabled(); |
|
*/ |
|
} |
|
|
324,7 → 334,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 |
|
|
339,7 → 349,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 |
|
} |
358,7 → 368,7 |
values[5]="5"; |
values[1]=listeObservation[i].getNomSaisi(); |
|
// table.add(new TableItem(values)); |
table.add(new TableItem(values)); |
|
} |
|
860,7 → 870,7 |
} |
|
|
//panel.getHeader().setText(dep + com + lieu + dat); |
panel.getHeader().setText(dep + com + lieu + dat); |
|
|
|
874,7 → 884,7 |
* Evenements |
* |
*/ |
/* |
|
public void handleEvent(BaseEvent be) { |
switch (be.type) { |
case ObservationMediateur.NOMBRE_OBSERVATION: |
886,16 → 896,13 |
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 |
* |