Announcement

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

    Can you add metadata to RestDatasource request?

    SmartClient V91d

    I am using the restdatasource to connect with a custom backend server.

    Currently this data is sent to the server on a fetch request
    Code:
     {
        "dataSource":"Contact", 
        "operationType":"fetch", 
        "startRow":0, 
        "endRow":75, 
        "textMatchStyle":"substring", 
        "componentId":"contactsList", 
        "data":{
        }, 
        "oldValues":null
    }
    I would like to add a meta data property like tableName how can you do this?

    I know how to add data to the dsRequest.data section in the transform request but not the metadata section.

    Also the RestDataSource has a property for tableName or beanClass, ect which would be fine to use but even when setting these props they are not sent to the server. I tried setting server type to "sql" even though I am not using SmartClient Server just to force the tableName prop to be sent, but it wasn't.

    Thanks,

    Dan

    #2
    Any update on this question?

    Also if you can add a key/value property to the meta data for one operation will it also work when calling saveAllEdits on the grid for the RestDataSource, saveAllEdits creates a transaction and has metadata for each record such as datasourcename, I would also like to be able to add meta data to the transactions as well.

    Thanks,
    Dan

    Comment

    Working...
    X