Unicode data on the clipboard - not a supported DataFlavor

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Unicode data on the clipboard - not a supported DataFlavor

duncan787
My Wicket app needs to read the plain-text contents of the clipboard, but Transferable.getTransferDataFlavors() is returning empty.

The really weird thing is that when I run the Wicket app in DEBUG mode, a valid DataFlavor is returned and everything works!  Here is a pared down source code listing:

Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
Transferable contents = clipboard.getContents(null);
int count = contents.getTransferDataFlavors().length;

count is 0 in DEBUG mode and is > 0 in non-DEBUG mode (I tried it in Wicket's  DEVELOPMENT and DEPLOYMENT modes, both fail).

Thoughts?
Reply | Threaded
Open this post in threaded view
|

Re: Unicode data on the clipboard - not a supported DataFlavor

James Carman
How are you expecting a web user to get stuff onto the server clipboard?

On Wed, Oct 20, 2010 at 2:18 PM, duncan787 <[hidden email]> wrote:

>
> My Wicket app needs to read the plain-text contents of the clipboard, but
> Transferable.getTransferDataFlavors() is returning empty.
>
> The really weird thing is that when I run the Wicket app in DEBUG mode, a
> valid DataFlavor is returned and everything works!  Here is a pared down
> source code listing:
>
> Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
> Transferable contents = clipboard.getContents(null);
> int count = contents.getTransferDataFlavors().length;
>
> count is 0 in DEBUG mode and is > 0 in non-DEBUG mode (I tried it in
> Wicket's  DEVELOPMENT and DEPLOYMENT modes, both fail).
>
> Thoughts?
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Unicode-data-on-the-clipboard-not-a-supported-DataFlavor-tp3004359p3004359.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]