Welcome!

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

Reply
Developer
Posts: 235
Registered: ‎11-12-2008
My Device: Not Specified

Compose Email body cursor focus problem

i have use         appMenuItemRe.addMenuItem(ApplicationMenuItemRepository.MENUITEM_EMAIL_EDIT  , this);

 

with a custom menu say Mymenu ,now i want click on the Mymenu and if cursor  focuses on the To or CC or BCC the what ever i want to add in the body will not add in the body ,but if the cusor is on the compose body section then only it will add text in the body what ever i want to add.

 

i have use is code...

 Field focus = UiApplication.getUiApplication().getActiveScreen().getLeafFieldWithFocus();
 if(focus != null)
   {

                 --------------------------

                 -----------------------------

   }

 

i have use getLeafFieldWithFocus()....but it works where ever the cursor is.....

but i want that when only the cursor is on the compose body section then only it will work...

will not work when the curson is on To or CC or BCC

 

 

Please provide with the piece of code..that will be help fully for me...

Thanks in advance...

 

BlackBerry Development Advisor
Posts: 15,882
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Compose Email body cursor focus problem

Can you explain what you are trying to do?  I'm not clear on that from your message.  Do you want to update the body of the email message?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Developer
Posts: 235
Registered: ‎11-12-2008
My Device: Not Specified

Re: Compose Email body cursor focus problem

yes i want to reply the existing email wiht a custom ApplicationMenuitem say for eg mymenu

can u provide a piece of code...

Thanks in advance..

BlackBerry Development Advisor
Posts: 15,882
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Compose Email body cursor focus problem

Here are a couple examples that should help you.

 

Add a custom menu item to an existing BlackBerry application

http://supportforums.blackberry.com/t5/Java-Development/Add-a-custom-menu-item-to-an-existing-BlackB...

 

Create and send messages

http://supportforums.blackberry.com/t5/Java-Development/Create-and-send-messages/ta-p/445048

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Developer
Posts: 235
Registered: ‎11-12-2008
My Device: Not Specified

Re: Compose Email body cursor focus problem

Actuall i got this previously,but the thing i want to know the how to reply to an existing email through ApplicationMenuItem say mymenu ,means when i click mymenu and open the existing email it will automatically take the required things from the email  say for eg To,CC body and put the same thing in reply position , say how we reply while writing the email through gmail in web....This same reply i want to program through BB email...

Can any can provide with a piece of code...

Thanks in advance...

BlackBerry Development Advisor
Posts: 15,882
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Compose Email body cursor focus problem

The ApplicationMenuItem should pass in a copy of the current message in the run command.  You can then call Message.reply to generate a reply email message.  Then populate the body and send it off, similar to the send email sample referenced above.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Developer
Posts: 235
Registered: ‎11-12-2008
My Device: Not Specified

Re: Compose Email body cursor focus problem

can u please provide with a piece of code.It's needs urgent...

Thanks in advance