Announcement

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

    Cannot rename RestDataSource request params nor add others based on existing ones

    Hi,
    I'm using a RestDataSource to send requests to the server (actually a grails web application).

    Since at server side I cannot use parameters whose name start with the UNDERSCORE (smartclient uses them by default, as I can understand), I'd need to:
    * change the smartclient defaults (say sending "startRow" instead of "_startRow")
    * or at least duplicate every parameter using almost the same name but without the leading "_" (i.e. ending up with both "_startRow" and "startRow" parameters, with the same value).

    I've not found a way to customize default param names, so I tried to override
    Code:
    RestDataSource.transformRequest(DSRequest dsRequest)
    But at this point I was not able to get the original parameters to copy from, since DSRequest only exposes a setParams(Map params) method and on the RestDataSource type hierarchy a cannot find any such getter...
    Could you give me any hint?

    Thank you,
    Davide

    #2
    See RestDataSource.metaDataPrefix for a way to change the underscore to something else (or remove it entirely).

    Comment

    Working...
    X