ResultFormat doesnot matter here. I am not sure where the problem lies in your code. Try setting a breakpoint on the faultHandler method and then debug the application....may be this will give you a clear picture.
-Ravi On Jun 9, 2:11 pm, Gerald Anto Fernando <[email protected]> wrote: > hello Ravi, > i have already done what you told but i didnt get what i expect. > but one thing i didnt mention "resultFormat " is it mater? i dont know give > me a reply soon > > Thanks&Regards, > Gerald A > > > > On Tue, Jun 9, 2009 at 2:32 PM, Ravi Mishra <[email protected]> wrote: > > > In your faultHandler method just write "no data in server" in the > > alert. Something like this: > > > Alert.show("no data in server"); > > > HTH, > > > -Ravi > > > On Jun 9, 12:49 pm, Gerald Anto <[email protected]> wrote: > > > Hello Friends, > > > > tell me how to handle fault event .following is my code > > > > <mx:Script> > > > private function onResult(event:ResultEvent):void{ > > > myData = event.result.catalog.product as ArrayCollection; > > > if(myData.length > 0){ > > > lineChart.dataProvider = myData; > > > volumeChart.dataProvider = myData; > > > } > > > > } > > > private function onFault(event:FaultEvent):void{ > > > Alert.show(event.fault.faultString,"Could not open"); > > > PopUpManager.removePopUp(this); > > > } > > > </mx:script> > > > > <mx:HTTPService id="dataRequest" method="GET" > > > url="http://localhost:8080/projects/FlexNew/pages/ > > > dataSPOT.jsp" > > > useProxy="false" result="onResult(event)" fault="onFault > > > (event)" > > > /> > > > for every button click i set one symbol name to HTTPService and send a > > > request to server that will give me a xml format data then i will plot > > > that data in my chart(actuall am creating a chart in title window) > > > my problem is , for some symbol name there is no data in server so my > > > jsp page will return null node(i think) > > > my mxml screen disply the error that cannot access the null object. > > > but i want if there is no data for request i have to handle in the > > > fault event(just a message that no data in server) not to display > > > error code(my application shows the error code). i have attached my > > > code .so please help me how to handle it > > > > Thanks&Regards, > > > Gerald Anto Fetrnando > > -- > Thanks & Regards, > A Gerald --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

