11,6 → 11,7 |
import org.tela_botanica.client.modeles.ValeurListeAsyncDao; |
import org.tela_botanica.client.synchronisation.Sequenceur; |
import org.tela_botanica.client.util.Debug; |
import org.tela_botanica.client.util.UtilString; |
|
import com.extjs.gxt.ui.client.Registry; |
import com.extjs.gxt.ui.client.data.BasePagingLoadConfig; |
34,12 → 35,15 |
|
@Override |
public void load(TransformateurJSONaModelData reader, Object loadConfig, AsyncCallback callback, String recherche) { |
this.reader = reader; |
this.callback = callback; |
this.loadConfig = loadConfig; |
this.reader = reader; |
this.callback = callback; |
this.loadConfig = loadConfig; |
|
BasePagingLoadConfig lc = (BasePagingLoadConfig)loadConfig; |
mediateur.selectionnerCollectionAPublication(this, this.collectionId, recherche, lc.getOffset(), lc.getLimit(), sequenceur); |
BasePagingLoadConfig lc = (BasePagingLoadConfig)loadConfig; |
|
if (!UtilString.isEmpty(this.collectionId)) { |
mediateur.selectionnerCollectionAPublication(this, this.collectionId, recherche, lc.getOffset(), lc.getLimit(), sequenceur); |
} |
} |
|
@Override |
48,23 → 52,24 |
|
try |
{ |
data = nouvellesDonnees; |
D d = null; |
|
if (reader != null) |
{ |
d = (D) reader.read(loadConfig, data); |
} |
else |
{ |
d = (D) data; |
if (d instanceof List) |
{ |
d = (D) new ArrayList((List) d); |
} |
} |
|
callback.onSuccess(d); |
D donneesRetour = null; |
if (nouvellesDonnees!=null) { |
data = nouvellesDonnees; |
if (reader != null) |
{ |
donneesRetour = (D) reader.read(loadConfig, data); |
} |
else |
{ |
donneesRetour = (D) data; |
if (donneesRetour instanceof List) |
{ |
donneesRetour = (D) new ArrayList((List) donneesRetour); |
} |
} |
} |
callback.onSuccess(donneesRetour); |
|
} |
catch (Exception e) |
{ |