10,8 → 10,10 |
import org.tela_botanica.client.modeles.Valeur; |
import org.tela_botanica.client.modeles.ValeurListe; |
import org.tela_botanica.client.modeles.ValeurListeAsyncDao; |
import org.tela_botanica.client.modeles.publication.PublicationAPersonneListe; |
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; |
36,12 → 38,17 |
|
@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.selectionnerPublicationsAPersonne(this, personneId, rolesId, recherche, lc.getOffset(), lc.getLimit(), sequenceur); |
BasePagingLoadConfig lc = (BasePagingLoadConfig)loadConfig; |
|
if (!UtilString.isEmpty(this.personneId)) { |
mediateur.selectionnerPublicationsAPersonne(this, personneId, rolesId, recherche, lc.getOffset(), lc.getLimit(), sequenceur); |
} else { |
this.rafraichir(null); |
} |
} |
|
public void setPersonneId(String personneId) { |
58,23 → 65,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) |
{ |