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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
New Developer
bb_vs_123
Posts: 6
Registered: ‎06-23-2009

How to customize menu options in blackberry browser based application

 

hi,

 

I am new to the BB development world and need some help. We are considering developing some thin client, browser based app. I want to know, Can we customize menu options in blackberry browser based on the application?

 

In other words I want to show menu options in BB browser based on my app.

 

Please let me know if there is any way to achieve this.

 

Thanks.

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 869
Registered: ‎04-12-2010
My Carrier: Bell

Re: How to customize menu options in blackberry browser based application

Hi there,

 

Within your application, you can integrate custom menu items using the WebWorks APIs:

https://bdsc.webapps.blackberry.com/html5/apis/blackberry.ui.menu.html

 

However, if you want to integrate menu items with the OS directly, you will need to write an extension using the Java APIs:

https://bdsc.webapps.blackberry.com/html5/documentation/ww_developing/using_javascript_extensions_18...

 

The Java APIs you would need to use are documented here:

http://www.blackberry.com/developers/docs/7.0.0api/net/rim/blackberry/api/menuitem/ApplicationMenuIt...

 

Please let me know if you have any questions.

Erik Oros
BlackBerry Development Advisor
@WaterlooErik
Please use plain text.
Trusted Contributor
zahirw
Posts: 134
Registered: ‎04-15-2012
My Carrier: Vodafone

Re: How to customize menu options in blackberry browser based application

Oros, any idea how you could rearrange tthe default Select, Switch & Close options in your custom api based menu to better suit the options? Eg, moving select all the way to the top?
Please use plain text.
BlackBerry Development Advisor
oros
Posts: 869
Registered: ‎04-12-2010
My Carrier: Bell

Re: How to customize menu options in blackberry browser based application

You may be able to loop through the contents of a Menu Object and call setOrdinal on its MenuItem children:

http://www.blackberry.com/developers/docs/7.0.0api/net/rim/device/api/ui/MenuItem.html

 

This should allow you to reorganize the ordinals (i.e. positions) of the items. Though whether you'll be able to override system menu items I can not make any guarantees. This would be one that would have to be tried and tested to make sure.

Erik Oros
BlackBerry Development Advisor
@WaterlooErik
Please use plain text.