[NEON] Drag & Drop [message #1721707] |
Fri, 29 January 2016 10:30  |
Eclipse User |
|
|
|
Hi
Drag & Drop seems to be implemented in the new HTML UI, as it was in previous versions of Scout.
Unfortunately, I couldn't make it work.
Here's my test case:
A form with to TableFields (From, To).
The FromTableField implements execDrag, the ToTableField implements execDrop. See the code below.
When I start the application and try drag a row with the mouse, "nothing happens".
- There is no visual feedback that "the mouse pointer is dragging/holding the row".
- By debugging, I couldn't see any event from the UI. "execDrag" was not called. Also, there was no TableEvent.TYPE_ROWS_DRAG_REQUEST catched by the TableListener that is attached to the table in AbstractTable.initConfig(). I guess this is the place where the UI event should be catched and delegated to execDrag.
Is something wrong with my code? Or is this feature not yet fully implemented for the new UI?
Code:
public class HeaderBox extends AbstractGroupBox {
@Order(1000.0)
public class FromTableField extends AbstractTableField<FromTableField.Table> {
public class Table extends AbstractTable {
public NameColumn getNameColumn() {
return getColumnSet().getColumnByClass(NameColumn.class);
}
@Override
protected int getConfiguredDragType() {
return IDNDSupport.TYPE_JAVA_ELEMENT_TRANSFER;
}
@Override
protected TransferObject execDrag(List<ITableRow> rows) {
List<String> values = getNameColumn().getValues(rows);
return new JavaTransferObject(values);
}
@Order(1000.0)
public class NameColumn extends AbstractStringColumn {
@Override
protected String getConfiguredHeaderText() {
return TEXTS.get("Name");
}
@Override
protected int getConfiguredWidth() {
return 100;
}
}
}
@Override
protected String getConfiguredLabel() {
return TEXTS.get("from");
}
@Override
protected int getConfiguredGridH() {
return 6;
}
}
@Order(2000.0)
public class ToTableField extends AbstractTableField<ToTableField.Table> {
public class Table extends AbstractTable {
public NameColumn getNameColumn() {
return getColumnSet().getColumnByClass(NameColumn.class);
}
@Override
protected int getConfiguredDropType() {
return IDNDSupport.TYPE_JAVA_ELEMENT_TRANSFER;
}
@Order(1000.0)
public class NameColumn extends AbstractStringColumn {
@Override
protected String getConfiguredHeaderText() {
return TEXTS.get("Name");
}
@Override
protected int getConfiguredWidth() {
return 100;
}
}
@Override
protected void execDrop(ITableRow row, TransferObject t) {
if (t instanceof JavaTransferObject) {
JavaTransferObject jt = (JavaTransferObject)t;
List<String> localObjectAsList = jt.getLocalObjectAsList(String.class);
for (String string : localObjectAsList) {
addRowByArray(new String[]{string});
}
}
}
}
@Override
protected String getConfiguredLabel() {
return TEXTS.get("to");
}
@Override
protected int getConfiguredGridH() {
return 6;
}
}
}
|
|
|
Re: [NEON] Drag & Drop [message #1722175 is a reply to message #1721707] |
Wed, 03 February 2016 08:58   |
Eclipse User |
|
|
|
Hi Silvio
The current version only supports Drag & Drop for file upload. That means you can drag a file from your desktop and drop it on a table, tree, image or filechooser field.
Drag and Drop inside the application (like from one table to another) has not been implemented yet.
|
|
|
Re: [NEON] Drag & Drop [message #1724491 is a reply to message #1722175] |
Wed, 24 February 2016 08:53   |
Eclipse User |
|
|
|
Do you already know when application-internal D&D will be implemented?
It is not urgent for us, but it's important to know IF and WHEN it will be available.
Thanks
|
|
|
|
Re: [NEON] Drag & Drop [message #1782220 is a reply to message #1780951] |
Tue, 20 February 2018 14:57   |
Eclipse User |
|
|
|
Hi
I am sorry to say that this feature is still not implemented yet and it is not planned to implement it in the near future.
Could you describe your use case? Do you need D&D for a table or another widget? Do you want to reorder table rows or drag a row from one table to another?
Kind regards
Claudio
|
|
|
Re: [NEON] Drag & Drop [message #1782274 is a reply to message #1782220] |
Wed, 21 February 2018 08:07   |
Eclipse User |
|
|
|
Claudio Guglielmo wrote on Tue, 20 February 2018 14:57Hi
I am sorry to say that this feature is still not implemented yet and it is not planned to implement it in the near future.
Could you describe your use case? Do you need D&D for a table or another widget? Do you want to reorder table rows or drag a row from one table to another?
Kind regards
Claudio
Thanks for the response.
In our use case it would be beneficial for the usability of the application if the user could D&D a row from one table to another. Its just more intuitive to work with.
[Updated on: Wed, 21 February 2018 08:09] by Moderator Report message to a moderator
|
|
|
Re: [NEON] Drag & Drop [message #1847303 is a reply to message #1782274] |
Fri, 22 October 2021 09:45  |
Eclipse User |
|
|
|
Hello,
I am working on the Eclipse scout 11 version and D&D from table to table is not implemented, I wished that this functionality was implemented becuase .
Hope for next release.
Kind Regards
|
|
|
Powered by
FUDForum. Page generated in 0.04408 seconds