Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » File Drop on a table row no more working ?
File Drop on a table row no more working ? [message #1847291] Thu, 21 October 2021 20:14 Go to next message
Michel R is currently offline Michel RFriend
Messages: 46
Registered: April 2015
Member
Hello,

I just upgraded my Scout application from Scout 10 to Scout 11. I use the Java environment.

I use the file drop feature on Table Pages, both on rows and on empty space.

When I drop the file on a row, I expect to get the target row in my application. It used to work with Scout 10.

After the upgrade to Scout 11, it doesn't work anymore.
I did some debugging, firstly in the Java application, then in the browser.

What I see is that the 'rowId' property is empty in the uploadProperties variable in JsonTable.consumeBinaryResource.

I checked what happens in Table.js, I see this:

  _createDragAndDropHandler() {
    return dragAndDrop.handler(this, {
      supportedScoutTypes: dragAndDrop.SCOUT_TYPES.FILE_TRANSFER,
      onDrop: event => this.trigger('drop', event),
      dropType: () => this.dropType,
      dropMaximumSize: () => this.dropMaximumSize,
      additionalDropProperties: event => {
        let $target = $(event.currentTarget);
        let properties = {
          rowId: ''
        };
       if ($target.hasClass('table-row')) {    // <=== issue here
          let row = $target.data('row');
          properties.rowId = row.id;
        }
        return properties;
      }
    });
  }


The indicated line is where it fails. The target has no 'table-row' class, because at this point it is the table itself, not the row. So the rowId property remains an empty string. Anyway, since it is not a row, the target has no 'row' property.

additionalDropProperties
  <this>: {...}
  $target: {...}
    0: div.table.detail-table.parts-page.view
    length: 1
    <prototype>: {...}


Should I change something when I build my table so that the row can be the target of the drop ? It worked before... Or what can I do ? Is it a bug ?

Thank you.
Michael.
Re: File Drop on a table row no more working ? [message #1847316 is a reply to message #1847291] Fri, 22 October 2021 12:14 Go to previous messageGo to next message
Claudio Guglielmo is currently offline Claudio GuglielmoFriend
Messages: 256
Registered: March 2010
Senior Member
Hi Michael,

thanks for pointing this out. Yes, it is a bug. Could you file it please? We have just recently moved to GitHub, so you have the honor to open the first bug :-)

https://github.com/eclipse-scout/scout.rt/issues

Thank you!
Re: File Drop on a table row no more working ? [message #1847694 is a reply to message #1847316] Wed, 03 November 2021 21:35 Go to previous message
Michel R is currently offline Michel RFriend
Messages: 46
Registered: April 2015
Member
Hi Claudio,

Sorry I am late to read this, I was out for holidays for a few days...
I just opened the first bug !

Thank you!
Michael

Previous Topic:PlannerField - Error when navigating
Next Topic:Best Practice Question
Goto Forum:
  


Current Time: Sun Apr 21 14:57:45 GMT 2024

Powered by FUDForum. Page generated in 0.03146 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top