Skip navigation
Currently Being Moderated

Remote Call to Blazeds and displaying the result set in grid

Jun 25, 2013 3:49 AM

Tags: #flex #blazeds #flash_builder_4.7



I want to call a remote method using Flex application from Blazeds and display the values in DataGrid. Can anyone help in this ?


-- I am using AMFChannel

-- The method to be called is PolicyApnVO.getPoliciesApn()

-- Please advice any correction if required


Here is the mxml code :


<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx=""

                creationComplete="initApp()" viewSourceURL="srcview/index.html">



    Simple client to demonstrate runtime configuration of destinations.

    The "runtime-employee" destination is configured in






            import mx.messaging.ChannelSet;

            import mx.messaging.channels.AMFChannel;

            import mx.rpc.remoting.mxml.RemoteObject;



            public var srv:RemoteObject;


            public function initApp():void


                var channel:AMFChannel = new AMFChannel("my-amf", "");

                var channelSet:ChannelSet = new ChannelSet();


                srv = new RemoteObject();


                srv.channelSet = channelSet;







    <mx:Panel title="Policy Details" width="100%" height="100%">

        <mx:DataGrid width="100%" height="100%" dataProvider="{} "



                <mx:DataGridColumn headerText="APN Id" dataField="apnId"/>

                <mx:DataGridColumn headerText="APN Name" dataField="apnName"/>

                <mx:DataGridColumn headerText="Policy ID" dataField="policyId"/>

                <mx:DataGridColumn headerText="Policy Name" dataField="policyName"/>






  • Currently Being Moderated
    Jun 25, 2013 7:22 AM   in reply to Manas66

    There may be other ways to do this but here's what I would do:


    1) add a results method to the remote object:



    2) add the callback method: private function onResult(event : * = null)


                                                         if(event is


                                                                myData =




    3) add the variable: Re: Remote Call to Blazeds and displaying the result set in grid private var myData:ArrayCollection;


    4) make the dataProvider for the grid use the my data :



    You can probably avoid all this by adjusting your dataProvider. I am just

    not sure what it would be without experimenting. But definitely not what

    you have. Maybe just {svc.result}.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points