Announcement

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

    RPC DMI allowed paramter types

    SmartClient Version: v8.2p_2012-11-15/PowerEdition Deployment (built 2012-11-15)

    In trying to use RPC DMIs, I've noticed that certain types of parameters and/or return values don't appear to be supported. The documentation in the DmiOverview section doesn't clarify this.

    For example, I had a method that takes a string and a Map<Integer, Integer> as parameters:
    Code:
    public Integer moveDevices( Integer targetDMServer, Map<Integer, Integer> devices )
    which didn't get called when passed a Map<Integer, Integer>.

    Upon changing the method to be:
    Code:
    public Integer moveDevices( Integer targetDMServer, Map<String, String> devices )
    and calling with a Map<String, String>, everything worked fine.

    I've had similar experience with the return parameters so I'm looking for some clarification and/or documentation on supported types.

    Thanks!

    Matt

    #2
    The difficulty here is that of course the browser does not natively run Java, so when you compile any GWT application, your client side code which was written in java has been converted into JavaScript and deals with JavaScript objects in memory.

    Therefore when sending data to the server there's a 2 step conversion process.
    Your client side Java is actually represented as JavaScript.
    This is serialized and sent to the server, which then parses the request and creates true java objects on the server.

    Here's an overview of the data type conversions:

    http://www.smartclient.com/smartgwte...aScriptObject)

    Comment


      #3
      Excellent - just what I was looking for.

      Thanks!

      Comment

      Working...
      X