Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Cut and Paste in JavaAplet mode (Read 2204 times)
marty
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Sep 22nd, 2009
Cut and Paste in JavaAplet mode
Sep 22nd, 2009 at 12:45pm
Print Post  
Has anyone implemented cut and paste in JavaAplet mode? I get a java.security.Access.ControlException(access denied) whenever I call any DiagramView method that uses the clipboard.
Thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Cut and Paste in JavaAplet mode
Reply #1 - Sep 22nd, 2009 at 2:46pm
Print Post  
Try using the copySelection and pasteSelection methods of the Diagram class. This won't save the items in the Windows clipboard, but will return an object that contains the cloned items which you could keep in some JS variable on the page.

If you have a digital certificate, you could sign the applet and the clipboard functions should work too.

While researching this, we found Java supports some kind of "local" clipboards, independent from the system clipboard. Our developer will check if using local clipboard works without additional security permissions.

Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Cut and Paste in JavaAplet mode
Reply #2 - Sep 27th, 2009 at 1:51pm
Print Post  
We have added clipboard methods to the DiagramApplet class. They use a local clipboard and aren't subjects to security checks:
https://mindfusion.eu/_beta/applet_clipbrd.zip

Code
Select All
var applet = <%= diagramView.AppletElement %>;
applet.copyToClipboard();
applet.pasteFromClipboard(10, 10);
 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint