I have set up some basic CRUD services, the reading part works fine but create, update and delete dont' seem to do a bean. I have been using the network monitor to see what is happening and can see my read services woking fine but the others dont do a thing when called.
<fx:Declarations> <customcategoryservice:CustomcategoryService id="customcategoryService" </fx:Declarations> <fx:Script> protected function cat_dg_creationCompleteHandler(event:FlexEvent):void </fx:Script>
fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"
showBusyCursor="true"/>
<s:CallResponder id="createCustom_categoryResult"/>
<s:CallResponder id="getCustom_categoryByAuthorIDResult2" result="getCustom_categoryByAuthorIDResult2_resultHandler(event)"/>
<s:CallResponder id="updateCustom_categoryResult" result="updateCustom_categoryResult_resultHandler(event)"/>
<s:CallResponder id="deleteCustom_categoryResult" result="deleteCustom_categoryResult_resultHandler(event)"/>
{
getCustom_categoryByAuthorIDResult2.token = customcategoryService.getCustom_categoryByAuthorID(current_user, image_target);
}
protected function getCustom_categoryByAuthorIDResult2_resultHandler(event:ResultEvent):void
{
// TODO Auto-generated method stub
arr_custom_categories = event.result as ArrayCollection;
}
protected function update_button_clickHandler(item:Custom_category):void
{
updateCustom_categoryResult.token = customcategoryService.updateCustom_category(item);
}
protected function delete_button_clickHandler(itemID:int):void
{
deleteCustom_categoryResult.token = customcategoryService.deleteCustom_category(itemID);
}
protected function createCustom_categoryResult_resultHandler(event:ResultEvent):void
{
arr_custom_categories.addItem(event.result);
custom_category = event.result as Custom_category;
cat_dg.scrollToIndex(arr_custom_categories.length);
}
protected function updateCustom_categoryResult_resultHandler(event:ResultEvent):void
{
trace('Updated successfully');
}
protected function deleteCustom_categoryResult_resultHandler(event:ResultEvent):void
{
arr_custom_categories.removeItemAt(cat_dg.selectedIndex);
}
The services work fine when I use the sevices test operation in flash builder, just nothing when testing on the build.
Pete