Switch branches/tags
Nothing to show
Find file History
Pull request Compare This branch is 1229 commits behind blackberry:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



This template is designed to help developers get started writing their own WebWorks extensions. Download and modify the source and make changes throughout wherever you see a "STEP n" instruction.

Authors: Adam Stanley

Tested On

  • BlackBerry Tablet OS v
  • BlackBerry Tablet OS v
  • BlackBerry Tablet OS v

Have a problem with this extension? Log an Issue or contact the Author

How to install this extension

  1. Download the source from this repository and extract it to a location on your computer.

  2. Using File Explorer browse to the downloaded source code for this extension: Tablet\TEMPLATE.

  3. Copy the downloaded Tablet\TEMPLATE\blackberry.template directory to the extensions directory for the BlackBerry WebWorks SDK for Tablet OS. The default path for this location is C:\Program Files\Research In Motion\BlackBerry WebWorks SDK for TabletOS\bbwp\ext.

NOTE: Be sure to back-up this ext\blackberry.template directory in your WebWorks SDK extensions directory before performing a WebWorks SDK upgrade. Simply copy it back into the ext directory after you have completed your SDK upgrade.


If you encounter Air Packager exceptions when building your WebWorks app, it likely means there is a syntax or compiling error within your extension code.

How to test? Suggest building a sample WebWorks app, similar to test_app, that uses JavaScript unit tests to evaluate test your extension.

Note: You can can use Web Inspector to check runtime values and set breakpoints for JavaScript, however you cannot use Web Inspector to debug into the AIR layer (from JavaScript).


  1. Refactor this sample. Is there any way to make it easier to understand by simplifying the code?

Required Feature ID

Whenever you use the below feature id in any of your WebWorks applications this extension will be loaded for use.

<feature id="blackberry.template" />


This template demonstrates the basics of how to provide readable and writeable properties, as well as functions and properties.

static boolean bool
static string string
static int integer
static int add(int first, int second)
static void log()
static void onEvent(function onComplete)

Code Example

function properties() {
	blackberry.template.string = (blackberry.template.bool ? "yes" : "no");
	blackberry.template.integer = blackberry.template.integer + 1;

function functions() {
	var result = blackberry.template.add(5,5);

function callbacks() {
	blackberry.template.onEvent(function (response) {
		console.log("event complete");