Skip to main content



      Home
Home » Eclipse Projects » Eclipse Scout » Copying to clipboard without intermediate window
Copying to clipboard without intermediate window [message #1757817] Mon, 20 March 2017 05:40 Go to next message
Eclipse UserFriend
When using BEANS.get(IClipboardService.class).setTextContents("foobar");

A popoup window is shown in the browser in which the user again has to press Ctrl-C to copy the selected values into the clipboard.

Is there a way to have the javascript code directly insert this text into the user's clipboard without this intermediate popup window?
Re: Copying to clipboard without intermediate window [message #1757818 is a reply to message #1757817] Mon, 20 March 2017 05:47 Go to previous messageGo to next message
Eclipse UserFriend
Unfortunately currently it is not possible to copy the values directly into the clipboard due to security restrictions of the browser (writing directly to the clipboard from JavaScript is only possible in an "user action context", but because Scout UI handles a command from the server, this is not in an "user action context").

If you want to write directly to the clipboard you would have to create your own custom widget w/o using the ClipboardService. Within this widget you could write directly to the clipboard (as long as you write to the clipboard in an "user action context").
Re: Copying to clipboard without intermediate window [message #1757841 is a reply to message #1757818] Mon, 20 March 2017 10:52 Go to previous message
Eclipse UserFriend
Thanks for your answer (even if it wasn't what I wanted to hear Smile
Previous Topic:Eclipse Scout & BIRT
Next Topic:[neon] jetty launcher with https
Goto Forum:
  


Current Time: Tue Jul 15 23:02:19 EDT 2025

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

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

Back to the top