Expand my Community achievements bar.

Item Not Managed By This Service on deleteItem

Avatar

Level 2
I have an error that says:




handleServiceFault([FaultEvent fault=[RPC Fault
faultString="Item with id '55056A49-FDD8-2D8B-ECA6-808096EEB13E'
not managed by this service. Error on destination
'teacher.destination'." faultCode="Local.Call.Failed"
faultDetail="null"]
messageId="241F9299-047D-8AD5-E48C-8081192E0128" type="fault"
bubbles=false cancelable=true eventPhase=2])




A little background: I have a managed Teacher object which
extends a managed User object. There are corresponding Java objects
on the backend (running in a Tomcat server using with FDS). The
Teacher destination works great for createItem, updateItem and
fill, but when I use deleteItem, I get this error. It is almost
like FDS thinks that deleteItem on my teacher assembler cannot
accept the teacher object for deletion. Any ideas on where to look?



Thanks

Bill

5 Replies

Avatar

Level 2
A little more on this: I've found that I can create an
object, and it immediately appears in the list component so the
fill method is picking it up. However, I cannot delete it without
getting the "not managed by this service" error. If I click around
and trigger the fill again, it still gives the error. However, if I
close the client browser, start a new one, and login again, I can
then go and delete that item with no problems.



Anyone have any ideas?

Avatar

Former Community Member
Hi , I got this problem too , I can do fill , update and
create , but when I want to delete(object) , I got the same error
with you ,

Do you find any soulution?



This is the exception .

[RPC Fault faultString="Item with id
'D2E1A158-3977-047E-4A8B-25A2AC54C5C9' not managed by this service.
Error on destination 'OrderHandler'." faultCode="Local.Call.Failed"
faultDetail="null"]

at mx.data::ConcreteDataService/
http://www.adobe.com/2006/flex/mx/internal::dispatchFaultEvent()

at Function/
http://adobe.com/AS3/2006/builtin::apply()

at mx.rpc::AsyncDispatcher/::timerEventHandler()

at flash.utils::Timer/flash.utils:Timer::_timerDispatch()

at flash.utils::Timer/flash.utils:Timer::tick()



Avatar

Level 2
Hi,



I had this error too, but solved it. I'm not in work right
now, where my code is, but I try to remember how it was solved.

For the delete method you must pass only the id of the row
you wish to delete. But not your unique ID, for ex. teacherId, but
the one with LCDS identifies the rows. You should try this:



myDataservice.delete(object.id);

But nor sure. Tomorrow morning I look after at work, and post
the solution if the above doesn't work.

Avatar

Level 2
I was wrong. So the working code is:



<mx:Button label="Delete item"
click="ds.deleteItem(products.getItemAt(dtProducts.selectedIndex))"/>




it deletes the selected item from the DataGrid


dtProducts - is the dataGrid


ds - is the DataService


products - is the arraycollection



works fine for me...



hope this helps



bye