Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

Posts: 27
Registered: ‎07-17-2008
My Device: Not Specified
Accepted Solution

ActiveAutoTextEditField "Cut" menu item throws a java.lang.securityexception

I have an application with a login screen which has a ActiveAutoTextEditField for a username (which is an email address).  If an email address is displayed in the field, and the user highlights it and selects the "Cut" menu item a java.lang.securityexception is thrown and the application exits.


We are currently testing our application on 3 different devices - 8800, 8310, 8100.  This error occurs on both the 8800 and 8310 devices, but not the 8100.  I cannot replicate this error in any of the simulators on my PC.


Does anybody have any suggestions for resolving this issue, or know if I am able to remove the offending "Cut" menu item from the context menu?

Posts: 507
Registered: ‎07-15-2008
My Device: Not Specified

Re: ActiveAutoTextEditField "Cut" menu item throws a java.lang.securityexception

Long time ago I got the same problem with Date field on JDE 4.0 with BB 7290 device.


Exception occured when I ran Menu-Copy.


I implemented the following workaround.



/** * Invoked when the trackwheel is clicked. * @param status - Modifier key status. * @param time - Ticks since device reset. * @return True if the event was consumed; otherwise, false. */ public boolean trackwheelClick(int status, int time) { try{ Menu menu = new Menu(); makeMenu(menu, 0); menu.show(); } catch(Exception e){ // HACK!!!!! // this try-catch added to prevent SecurityException on device // (on simulator this bug does not appear) // When user tries to do the following // Open menu on date field, and select "Copy" // I do nothing here, I am just catching and ignoring this exception } return true; }


 Just catch and ignore this exception in place where you invoke the menu.





if your issue solved set "Solution" mark at the relevant post
Posts: 27
Registered: ‎07-17-2008
My Device: Not Specified

Re: ActiveAutoTextEditField "Cut" menu item throws a java.lang.securityexception

Thanks for this suggestion.  At least now I can stop the app exiting when the user selects "Cut". Cheers :-)