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