Hello everyone i have a bug when using the DataService component. I am
using a Java Assembler which extends from AbstractAssembler and has
the implementation of the DataService's methods (fill, createItem,
deleteItem, updateItem). My fill method implementation does certain
logic based on the number of parameters passed and calls a Java method
to obtain the result Collection.
Now on Flex i am calling the fill method and i pass an AS object (that
has remote alias metadata), which has a Java equivalent class. I am
calling it like this:

dataService.fill(arrayCollection, systemObject); 

where systemObject is an instance of an AS class (which i will call
sysObj) that, like i mentioned, has a Java equivalent.

On Java the fill is like this:

public Collection fill (List fillParameters) {
   SysObj a = (SysObj) fillParameters.get(0);
   List results = dao.findRoles (a.getId() );
   return results;
}

Now, when i add an item using the createItem method and then calling
the commit() method, the autoRefresh is executed calling once again
the fill method. This should trigger a CollectionChange event which
will automerge and autorefresh the ArrayCollection showing the
recently added item, the thing is that this IS NOT happening. I
debugged my Java code and it is indeed executing the fill method as a
result of the autoRefresh, but for some reason the ArrayCollection is
not receiving the notification. 
If on Flex I manually call the fill method again,
dataService.fill(arrayCollection, systemObject), then i can see the
recently added item.

Now let's modify the flex and java code to be like this:

dataService.fill(arrayCollection, systemObject.id); 

passing the object's id only to Java, which code changed to:

public Collection fill (List fillParameters) {
    List results = dao.findRoles (fillParameters.get(0));
    return results;
}

As you can see i am now sending and int value, then after createItem()
and commit() the autorefreshed is executed and the ArrayCollection IS
being refreshed too, showing the recently added item.

So in conclusion, when i send an AS object as a parameter of the fill
method, when the autoRefresh is executed it doesn't work but when i
send a primitive type (int) it does work. Is this a bug? Can't we pass
AS objects to the Assembler?? Like i said my AS object has a Java
equivalent class.

Please if anyone knows how to solve this please let me know







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to