Announcement

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

    ListGrid.saveRequestProperties not used when saveAllEdits() sends remove request

    Hi,
    The documentation of saveAllEdits() says that:
    Boolean ListGrid.saveAllEdits() ([rows, saveCallback])

    Save a number of outstanding edits for this ListGrid. If no rows are specified, all outstanding edits will be saved.

    Note that if saveRequestProperties is specified and the grid is performing a databound save, these properties will be applied to each generated DSRequest.
    Unfortunately, this saveRequesProperties is not considered when ListGrid.saveAllEdits() generates remove requests. On the other hand add and update indeed shows saveRequesProperties properly used.
    Is it by design? Shouldn't all request prepared and queued by saveAllEdits() take care of saveRequestProperties?
    Regards,
    MichalG
    using latest patched 6.0p

    #2
    This is by design. If you look at the docs for saveRequestProperties it explicitly calls out addRequestProperties and updateRequestProperties as alternatives for affecting the two types of operations that saveRequestProperties covers.

    What property are you trying to set that makes sense on all 3 types of operations?

    Note that another way to customize the "remove" operation is to set DBC.removeOperation so that it has a distinct dsRequest.operationId, which you could then detect in DataSource.transformRequest or in server-side code such as a DMI.

    Comment


      #3
      Originally posted by Isomorphic View Post
      What property are you trying to set that makes sense on all 3 types of operations?
      There is a grid with attachments which can be used alone, but also can be placed on variety of other panels, so it is then connected to objects in that panels. If it is placed on panel then it needs to send this context to server with every request made by saveAllEdits(), no matter if it is add, update or remove.
      OperationId is not sufficient as a string - I would like to have additional structure of data send with request.
      And I have it done using saveRequestProperties, but this omits remove requests from saveAllEdits().

      So what I would like to have is to send the same additional data witch each request generated by call saveAllEdits().
      Thanks,
      MichalG

      Comment


        #4
        As previously indicated, by way of setting an operationId, you would be able to add any additional context or behavior that is needed by implementing DataSource.transformRequest().

        Comment

        Working...
        X