Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 1525 → Rev 1526

/trunk/src/org/tela_botanica/client/composants/pagination/ChargeurListe.java
1,20 → 1,10
package org.tela_botanica.client.composants.pagination;
 
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
 
import org.tela_botanica.client.interfaces.Rafraichissable;
import org.tela_botanica.client.modeles.Information;
import org.tela_botanica.client.modeles.collection.CollectionAPersonne;
import org.tela_botanica.client.modeles.personne.Personne;
import org.tela_botanica.client.util.Debug;
import org.tela_botanica.client.util.UtilString;
 
import com.extjs.gxt.ui.client.data.BaseListLoadResult;
import com.extjs.gxt.ui.client.data.BaseModelData;
import com.extjs.gxt.ui.client.data.BasePagingLoadResult;
import com.extjs.gxt.ui.client.data.BasePagingLoader;
import com.extjs.gxt.ui.client.data.LoadEvent;
import com.extjs.gxt.ui.client.data.PagingLoadResult;
35,35 → 25,34
public boolean load(Object loadConfig, String recherche, boolean doRafraichir) {
this.doRafraichir = doRafraichir;
if (fireEvent(BeforeLoad, new LoadEvent(this, loadConfig))) {
lastConfig = loadConfig;
 
this.recherche = recherche;
loadData(loadConfig, recherche);
return true;
}
else return false;
lastConfig = loadConfig;
this.recherche = recherche;
loadData(loadConfig, recherche);
return true;
} else {
return false;
}
}
public boolean load(Object loadConfig) {
if (fireEvent(BeforeLoad, new LoadEvent(this, loadConfig))) {
lastConfig = loadConfig;
loadData(loadConfig, recherche);
return true;
}
return false;
if (fireEvent(BeforeLoad, new LoadEvent(this, loadConfig))) {
lastConfig = loadConfig;
loadData(loadConfig, recherche);
return true;
}
return false;
}
public void load(int offset, int limit) {
this.offset = offset;
this.limit = limit;
load();
this.offset = offset;
this.limit = limit;
load();
}
public boolean load() {
Object config = (reuseConfig && lastConfig != null) ? lastConfig : newLoadConfig();
config = prepareLoadConfig(config);
return load(config);
Object config = (reuseConfig && lastConfig != null) ? lastConfig : newLoadConfig();
config = prepareLoadConfig(config);
return load(config);
}
@SuppressWarnings("unchecked")
71,9 → 60,12
AsyncCallback<D> callback = new AsyncCallback<D>() {
public void onFailure(Throwable caught) {
onLoadFailure(config, caught);
if (!UtilString.isEmpty(caught.getMessage())) Debug.log("[FAILURE] ChargeurListe : message="+caught.getMessage());
else Debug.log("[FAILURE] ChargeurListe : message=NULL. Peut-être le modelType est-il mal paramétré ?");
onLoadFailure(config, caught);
if (!UtilString.isEmpty(caught.getMessage())) {
Debug.log("[FAILURE] ChargeurListe : message="+caught.getMessage());
} else {
Debug.log("[FAILURE] ChargeurListe : message=NULL. Peut-être le modelType est-il mal paramétré ?");
}
}
public void onSuccess(D result) {
117,6 → 109,6
}
}
};
((Proxy)proxy).load((TransformateurJSONaModelData)reader, config, callback, recherche);
((Proxy) proxy).load((TransformateurJSONaModelData) reader, config, callback, recherche);
}
}