1 Reply Latest reply on Nov 2, 2010 1:53 AM by Tanu Jain

    Return from remoteobject call


      When using RemoteObject call to a java class file the return is passed to the function defined by the result property of the Method tag in RemoteObject Declaration. Is there a way to return it to the method that calls the Class file instead? If I have a RemoteObject:


      myRemoteClass with method getFiles() and result=getFilesReturn()



      function getFiles(){






      function getFilesReturn(){


      do something with string returned




      How can I achieve the equivilent of:


      function getFiles(){


      var myReturnedString = myRemoteClass.myClassMethod(myPassedString);

      do something with myReturnedString



        • 1. Re: Return from remoteobject call
          Tanu Jain Level 2

          Remote Objects calls are asynchronous. This means that one doesn't immediately receive the response from the server.
          We need to attach an event listener for the result event which would be triggered once the result is available.

          One can do further operations on the result in the ResultHandler.


          However,  AsyncToken can be used in case multiple calls to server for same function are sent and their results need to be uniquely handled.