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

Web and WebWorks Development

Reply
New Developer
bb_vs_123
Posts: 6
Registered: ‎06-23-2009
My Device: Not Specified

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.

BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10

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 | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Trusted Contributor
zahirw
Posts: 134
Registered: ‎04-15-2012
My Device: Bold 9900

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?
BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10

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 | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.