DataService fill method BUG


i have application 2 dataservice objects, each 1 associated different destinations (java assemblers) , each 1 has different arraycollection asociated:

<mx:dataservice id="sistemasds" destination="sistemas" autocommit="false" autosyncenabled="true" automerge="true"/>
<mx:arraycollection id="sistemaslist"/>

<mx:dataservice id="rolesds" destination="roles" autocommit="false" autosyncenabled="true" automerge="true"/>
<mx:arraycollection id="roleslist"/>

the first dataservice works fine, can make call dataservice.fill( ) method , arraycollection filled
list obtained java assembler, can insert, delete , update items , arraycollection autorefreshed normally.

the second 1 not working correctly, 1 have 2 possibilites fill method, 1 parameter , 1 without parameters, this:

flex code
if (some condition) {
rolesds.fill(roleslist, sistemaobj);
}
else {
rolesds.fill(roleslist);
}

java assembler code
public collection fill(list fillparameters) {
list resultados = new arraylist();
if (fillparameters.size() > 0) {
resultados =
getservicedata().findrolesbysistemaid(fillparameters.get(0));
}
else {
resultados = getservicedata().findallroles();
}
return resultados;
}

the problem following: call first fill method (the 1 parameter) , arraycollection (roleslist) filled results javaassembler. insert new item calling dataservice.createitem(item) method, method in assembler inserts new register database, assembler re-executes fill method , returns new result list arraycollection in flex (roleslist) not being refreshed.
the funny thing happens when try insert new item, if delete or update item works fine, refreshing arraycollection (roleslist)

why happening? why isn't being refreshed first dataservice?? pretty sure java assembler calling fill method after creating item (i used system.out.println verify , if call first fill method again on flex, new register appears) reason arraycollection not being refreshed.

any ideas???

good morning,

would post complete destination declaration ds instantiation , settings using?

thanks.


More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support