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
Developer
Posts: 327
Registered: ‎12-13-2010
My Device: Bold 9900/Z10 Special Edition
My Carrier: Rogers

Adding MenuItem in the browser

Alright I've got a question about adding a menu item to the Browser from a webworks app.

 

I know I can do it using Java....and I'm familiar with creating/using extensions in webworks applications...

 

But say, for example; I create a Java extension which adds menu items to the browser....and I add that extension into my webworks app using the following:

 

 <feature id="sample.extension" required="true" version="1.0.0"/>

 ...How exactly will i invoke the Java code to add the menu items to the browser, using javascript? and will the menu items always be in the browser menu? or only when the app is open?

 

CEO/Lead Developer - Tensioncore™ Design Studios
http://tncr.ws/ - ShortenThis!™ for Blackberry Playbook | ShortenThis!™ for BlackBerry® 10
The Periodical Toe A highly informative Table of Elements
DrawThis! A fun drawing app for the BlackBerry® PlayBook™!
http://www.tensioncore.com/ - Tensioncore™ Web Hosting
Developer
Posts: 164
Registered: ‎08-26-2010
My Device: Not Specified

Re: Adding MenuItem in the browser

[ Edited ]

First, if you said that you are  familiar creating/using extensions in webworks applications, so you should know how to invoke the Java codes using javascript.

 

Second, to create Menu Item, why don't you using the built-in Webworks API : http://www.blackberry.com/developers/docs/widgetapi/blackberry.ui.menu.MenuItem.html

Developer
Posts: 327
Registered: ‎12-13-2010
My Device: Bold 9900/Z10 Special Edition
My Carrier: Rogers

Re: Adding MenuItem in the browser

I want to create a permanent menu item in the browser, not just in the webworks app itself....which it seems is not possible without doing via an extension.

 

My assumption is that I would create the extension, and then have the extension called from a background service with this in the config:

 

 

<rim:background src="background.html" runOnStartup="true" />

 

 

Does this all sound right?

 

I just wanted some confirmation, thats all.

CEO/Lead Developer - Tensioncore™ Design Studios
http://tncr.ws/ - ShortenThis!™ for Blackberry Playbook | ShortenThis!™ for BlackBerry® 10
The Periodical Toe A highly informative Table of Elements
DrawThis! A fun drawing app for the BlackBerry® PlayBook™!
http://www.tensioncore.com/ - Tensioncore™ Web Hosting
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Adding MenuItem in the browser

Hi tensioncore,

 

Yes you are correct Smiley Happy

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter