7 Replies Latest reply on Apr 15, 2011 12:49 AM by imran_issufo

    LCDS Fetching a single row

    imran_issufo

      Hello guys,

       

       

      i need your help,

       

      im doing Model Driven Development and want to know if there is a way to call a service method Synch  NOT Asynch.

      All the calls are Asynch.

      "

                     var funcionarioToken:AsyncToken = new FuncionarioService().getAll();

       

                  funcionarioToken.addResponder(new AsyncResponder(
                      function (event:ResultEvent, token:Object=null):void
                      {
                          _funcionarioInput.dataProvider = event.result;
                      },
                      function (event:FaultEvent, token:Object=null):void
                      {
                          Alert.show("Associated service call failed: " + event.fault.faultString, "Error");
                      }));

      "

       

      Is  there a way to define the return type of the service calls, for exemple  , if i want to fetch a single row from a database table by its ID how  would i do?

       

       

      var myVar:MyObjectType =  event.result as MyObjectType; ??????

       

       

      regards

      Imraan