Can you try having your "autoRefreshFill()" method return "false"? When autoRefresh is turned on, the server controls the ordering of the items in the collection so I think the problem is that you just need to turn it off.
Jeff ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Csiki Sent: Wednesday, October 03, 2007 5:19 AM To: [email protected] Subject: [flexcoders] Re: LCDS: Reordering managed collections? Thanks Jeff, I tried using this approach, and the result is the item I moved via DnD gets removed from the list. The methods addItemToFill and removeItemFromFill are both called, however the server overrides the client update, keeps the item deletion but does not insert the it at the new position in the list. Here's the class, followed by some log information. Thanks, Robert. public class RepositoryObjectAssembler extends AbstractAssembler { public Collection fill(List fillParameters) { String strFolderId = (String)fillParameters.get(0); Boolean bFoldersOnly = (Boolean)fillParameters.get(1); return RepositoryObjectDAO.getFolderContent(strFolderId, bFoldersOnly.booleanValue()); } public void createItem(Object newVersion) { // do nothing } public void updateItem(Object newVersion, Object prevVersion, List changes) { // do nothing } public void deleteItem(Object prevVersion) { // do nothing } public void addItemToFill(List fillParameters, int position, Map identity) { super.addItemToFill(fillParameters, position, identity); } public void removeItemFromFill(List fillParameters, int position, Map identity) { super.removeItemFromFill(fillParameters, position, identity); } public int refreshFill(List fillParams, Object item, boolean isCreate) { // no fill call is required return DO_NOT_EXECUTE_FILL; } } The LCDS log: [Flex] 10/03/2007 08:06:32.593 [DEBUG] [Message.Data.transacted] Before invoke service: data-service incomingMessage: Flex Message (flex.data.messages.DataMessage) operation = transacted id = null clientId = 3D6FBC44-BE1F-AEE0-0309-AC766B21EFD4 correlationId = destination = repositoryObjectAssembler messageId = A809E367-1A49-AB69-F4D9-65C297822CEE timestamp = 1191413192593 timeToLive = 0 body = [ Flex Message (flex.data.messages.DataMessage) operation = delete id = ASObject(27493784){objectId=0be4dc0980002e1a} &! nbsp; clientId = 6B1CE2F6-D08A-BC8B-2249-65C24C5F7CB0 correlationId = A809E367-1A49-AB69-F4D9-65C297822CEE destination = repositoryObjectAssembler messageId = 41799982-23C8-0188-8FB4-65C297729DC7 timestamp = 0 timeToLive = 0 body = [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> , Flex Message (flex.data.messages.DataMessage) operation = create id =! ASObjec t(9956648){objectId=0be4dc0980002e1a} clientId = 6B1CE2F6-D08A-BC8B-2249-65C24C5F7CB0 correlationId = A809E367-1A49-AB69-F4D9-65C297822CEE destination = repositoryObjectAssembler messageId = 9CB13D2B-6B5F-3AD5-E3BE-65C29782CFE4 timestamp = 0 timeToLive = 0 body = [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> , Flex Message (flex.data.messages.UpdateCollectionMe! ssage) operation = update_collection id = null clientId = 6B1CE2F6-D08A-BC8B-2249-65C24C5F7CB0 correlationId = A809E367-1A49-AB69-F4D9-65C297822CEE destination = repositoryObjectAssembler messageId = 412F15E4-2516-BA73-CCC4-65C29772DB9D timestamp = 0 timeToLive = 0 body = [ dele [EMAIL PROTECTED](5440609){objectId=0be4dc0980002e1a <mailto:[EMAIL PROTECTED](5440609)%7bobjectId=0be4dc0980002e 1a> }], [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] ] collectionId = [ 0be4dc098000045f, false ] replace = false updateMode = client_update ] &! nbsp; hdr(DSEndpoint) = my-rtmp hdr(DSId) = 3D6F602E-860F-C68A-4937-E11FB0DD926B [Flex] 10/03/2007 08:06:32.640 [DEBUG] [Service.Data.Transaction] Started transaction using jndi name: java:comp/UserTransaction [Flex] 10/03/2007 08:06:49.437 [DEBUG] [Service.Data.Transaction] Committed transaction [Flex] 10/03/2007 08:06:53.750 [DEBUG] [Service.Data.General] refreshFill for destination: repositoryObjectAssembler params: [null, true] returns: DO_NOT_EXECUTE_FILL [Flex] 10/03/2007 08:07:09.953 [DEBUG] [Service.Data.General] refreshFill for destination: repositoryObjectAssembler params: [0be4dc098000045f, false] returns: DO_NOT_EXECUTE_FILL [Flex] 10/03/2007 08:07:09.953 [DEBUG] [Message.Data.transacted] After invoke service: data-service reply: Flex Message (flex.messaging.messages.AcknowledgeMessage) clientId = null correlationId = null destination = null messageId ! = 3D717853-F119-5B48-1E34-EE513421CEA5 timestamp = 1191413229953 timeToLive = 0 body = [ Flex Message (flex.data.messages.DataMessage) operation = delete id = ASObject(27493784){objectId=0be4dc0980002e1a} clientId = 6B1CE2F6-D08A-BC8B-2249-65C24C5F7CB0 correlationId = A809E367-1A49-AB69-F4D9-65C297822CEE destination = repositoryObjectAssembler messageId = 41799982-23C8-0188-8FB4-65C297729DC7 ! ; timestamp = 1191413192640 &! nbsp;&nb sp; timeToLive = 0 body = [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> hdr(DSEndpoint) = my-rtmp hdr(DSId) = 3D6F602E-860F-C68A-4937-E11FB0DD926B, Flex Message (flex.data.messages.DataMessage) operation = create id = {objectId=0be4dc0980002e1a} clientId = 6B1CE2F6-D08A-BC8B-2249-65C24C5F7CB0 correlationId = A809E367-1A49-AB69-F4D9-65C297822CEE &! nbsp; destination = repositoryObjectAssembler messageId = 9CB13D2B-6B5F-3AD5-E3BE-65C29782CFE4 timestamp = 1191413192640 timeToLive = 0 body = [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> hdr(DSEndpoint) = my-rtmp hdr(DSId) = 3D6F602E-860F-C68A-4937-E11FB0DD926B, Flex Message (flex.data.messages.UpdateCollectionMessage) operation = update_collection id = n! ull & nbsp; clientId = 6B1CE2F6-D08A-BC8B-2249-65C24C5F7CB0 correlationId = A809E367-1A49-AB69-F4D9-65C297822CEE destination = repositoryObjectAssembler messageId = 412F15E4-2516-BA73-CCC4-65C29772DB9D timestamp = 1191413192640 timeToLive = 0 body = [ [EMAIL PROTECTED](5440609){objectId=0be4dc0980002e1a <mailto:[EMAIL PROTECTED](5440609)%7bobjectId=0be4dc0980002e1a> }], [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> }] ] hdr(DSEndpoint) = my-rtmp hdr(DSId) = 3D6F602E-860F-C68A-4937-E11FB0DD926B collectionId = [ 0be4dc098000045f, false ] replace = false ! updateMode = server_override, Flex Message (flex.data.messages.UpdateCollectionMessage) operation = update_collection id = null clientId = 6B1CE2F6-D08A-BC8B-2249-65C24C5F7CB0 correlationId = A809E367-1A49-AB69-F4D9-65C297822CEE destination = repositoryObjectAssembler messageId = srv:3D70B4AC-0D0F-AD8F-4CE2-658940E36E3D:0 timestamp = 1191413209437 timeToLive = 0 body = &nb! sp; [ [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> }] ] collectionId = [ 0be4dc098000045f, false ] replace = false updateMode = server_update ]

