You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by duncan787 <du...@gmail.com> on 2010/10/20 20:18:54 UTC

Unicode data on the clipboard - not a supported DataFlavor

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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


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

Posted by James Carman <ja...@carmanconsulting.com>.
How are you expecting a web user to get stuff onto the server clipboard?

On Wed, Oct 20, 2010 at 2:18 PM, duncan787 <du...@gmail.com> 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: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org