Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SGWT Server Side on PhoneGap Integration

    Hi Isomorphic,

    I am trying to develop an SmartGWT app suitable for packaging with Phonegap.

    I have learned, you can package the war directory as the www directory of the phonegap app but I have not idea what would be the server side behaviour.

    Should the database be public as a SQL Service, to let the Mobile Device make the Datasource Operations over the internet?

    In the phonegap tutorial and example content shows you can package the client side of your app. But what about the server side? Should be hosted in a Web Server and change the servlet mappings in web.xml?

    I am confused about how to make the server side of SGWT Power Edition work with Phone and I wonder you could help me how it works.

    Thanks in advance,

    Pablo

    #2
    Yes, the server-side should be hosted on the web somewhere and mobile clients will connect to it. There's no need to adjust web.XML unless you mean to add an authentication mechanism. But you will need to set RPCManager.actionURL to the URL where your server is deployed.

    Comment


      #3
      Thanks for your answer Isomorphic.

      In my case, I use the standard operations suchas adddata, fetchdata,...

      As I have read in the docs, this operations use the IDAcall servlet to make the requests so I suppose what I need to do is to change the RPC Manager instance and set its actionurl to the remote web Servlet.

      Is it possible to change the IDA Call servlet to change its RPC Manager Instances? How this can be done?

      Making this changes to the IDA Call servlet should solve the Server Side Integration or there is something more to be done?

      Looking forward your answer and thanks very much.

      Pablo

      Comment


        #4
        There's no need to change the IDACall servlet. The *client-side* RPCManager (there are both client and server versions of this class) needs to have it's actionURL changed to point to the web server.

        Comment


          #5
          Aha!!

          What you mean is that I only have to call RPCManager.setactionURL(web server) method in the onModuleLoad() and all the operations made inside the onmoduleload method will be sent to that url. Is that correct??

          In the actionURL, do i have to define the full url of the IDACall servlet or I just have to set the full url of the website war?

          Comment


            #6
            Full URL of the IDACall servlet.

            Comment

            Working...
            X