The deleteItem method implies you want to delete the method from all 
collections it lives in so I would not use that at all to remove the 
item from a group.  Usually, there is a property on the item itself 
which indicates which group it is in.  You might just set that 
property to null and commit that change.  If you have autoRefresh 
enabled for your fills, they would be reinvoked to refresh their 
contents.  The first one would still return the item, but the second 
one would no longer return the item because the item's group property 
was not set to that value anymore.  This assumes that the fill to 
retrieve a group's members is made on a query against properties on 
the item in the group.

It is also possible that the group membership is maintained by some 
separate table which is not part of the state of the item in the 
group.  In this case, the other way you can do this is to implement 
the flex.data.assemblers.Assembler interface (if you are not already) 
and override the "removeItemFromFill" method.  Then on the client, 
you just remove the item from the second collection using one of the 
ArrayCollection.removeItem or removeItemAt methods.  When you commit, 
your Assembler.removeItemFromFill method should be called which you 
can use to update that other table.  

Jeff

--- In flexcoders@yahoogroups.com, "dreuimar" <[EMAIL PROTECTED]> wrote:
>
> Hi everyone,
> 
> In FDS I have a Java class that with no parameters fills an
> ArrayCollection with all possible items, and by passing a parameter
> (such as a group number) another ArrayCollection is filled with what
> items have been 'added' to a particular group. Now this assembler
> obviously has a deleteItem method. When an item is deleted from the
> master list it should delete from both with FDS, and it is. The
> problem I'm having is that when someone deletes something from one 
of
> these 'groups' I just want it deleted from that group, rather than
> from the whole database.
> 
> Any ideas on how to pass parameters to deleteItem() without putting
> some property in the object or what I could do about this? (I think
> deleteItem only supports an object as a param.
>







--
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/

<*> 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