Announcement

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

    getUploadedFile in DMI

    Hi, issue may be related to this thread,

    http://forums.smartclient.com/showthread.php?t=12634

    but I have to be sure if I understood it correctly. The issue (if it is an issue) may be corrected in the current nightly already but I cannot test it due to http://forums.smartclient.com/showthread.php?t=27565,

    I am trying to upload a file from a ListGrid, intercept the dsRequest via DMI and grab the file using dsRequest.getUploadedFile('binaryFieldName') in order to save it to disk (instead of DB).

    However, in each request getUploadedFile returns null.
    So before digging deeper into this:
    Do I need to call saveData() on the client side explicitly somewhere or is this done implicitly by the ListGrid when it triggers an add or update operation?
    In other words: Does the file upload in a ListGrid need additional logic other than what's there per default?

    Thanks,
    fatzopilot

    #2
    Update: Same behavior is still existent in v8.3p_2013-08-19/PowerEdition Deployment (built 2013-08-19)

    Comment


      #3
      Just to make it more clear:
      The upload works fine if the UI is a DynamicForm with a "SAVE" Button that triggers saveData() (i.e. dsRequest.getUploadedFile('binaryFieldName') is not null). It does not work if the UI is a simple ListGrid (fields derived from datasource) where the binaryFieldName field is shown as a column and the row is simply saved by hitting ENTER.
      Is this a bug or is Upload restricted to DynamicForms?

      Thanks,
      fatzopilot

      SmartClient Version: v8.3p_2013-07-14/PowerEdition Deployment (built 2013-07-14), GWT 2.5.1
      FF 23.0.1 (Windows 8)

      Comment


        #4
        There's no way to upload data from editors shown inline in a grid, because the grid constantly redraws rows and we can't restore the value of an upload item if the DOM has to be re-created.

        Instead, use listGridField.editorType to create an interface that pops open a dialog to do the upload.

        Comment

        Working...
        X