|
Re: Copy to Clipboard [message #1740374 is a reply to message #1740357] |
Fri, 12 August 2016 12:14 |
|
Andreas Christ wrote on Fri, 12 August 2016 03:54Is there anything in Scout we could use?
Certainly!
BEANS.get(IClipboardService.class).setTextContents("Hello");
Note that in the new HTML UI this triggers a popup window with the text to copy, and the user has to press Ctrl-C manually. Unfortunately, we cannot write directly to the clipboard due to security restrictions of the browser. (Writing to the clipboard from JavaScript is not entirely impossible. But when the Scout UI handles the command from the server to write something to the clipboard, it is no longer in a "user action context", and the browser ignores the command. If you want to write to the clipboard directly, you would have to create your own custom widget.)
Regards,
Beat
|
|
|
|
|
|
|
|
Re: Copy to Clipboard [message #1751164 is a reply to message #1751159] |
Thu, 05 January 2017 08:40 |
Andreas Christ Messages: 32 Registered: April 2016 |
Member |
|
|
Thank you! ... I was so close... in my execCompleteEdit I had the following two lines for reload:
reloadPage();
super.execCompleteEdit(row, editingField);
Without them - like in your solution - it works!
But there is a tiny grey triangle in each copyable cell (see your example) - that should indicate a editable filed, right? I'll have to ask the customer for acceptance of that.
But I'm still looking for an easier way: just select an entry in the table for copy with CTRL-C...
[Updated on: Thu, 05 January 2017 08:42] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05823 seconds