param element

Syntax

<feature id="...">
    <param name="string" value="string" />
</feature>

Description

The <param> element defines a parameter for a particular feature (for example, screen orientation).

Parent elements

<feature> (In addition, you must specify blackberry.app as the value of the id attribute for <feature>.)

Child elements

None

Occurrences

Zero or more

Features

To specify a particular feature for your app, use the following associated attributes:

Attribute Description
orientation

Specifies the orientation for screens in your app.

When name="orientation", the value attribute must specify one of the following strings:
  • auto - Specifies that screen orientation changes according to the orientation of the device.
  • portrait - Specifies that screen orientation remains in portrait mode, regardless of the orientation of the device.
  • landscape - Specifies that screen orientation remains in landscape mode, regardless of the orientation of the device.

By default, if you do not specify a screen orientation, the orientation is set to auto.

Example
<feature id="blackberry.app">
    <param name="orientation" value="portrait" />
</feature>
backgroundColor

Specifies the background color for your app.

When name="backgroundColor", the value attribute must specify a color value in the ARGB pixel format using 8 hexadecimal digits.

Example
<feature id="blackberry.app">
    <param name="backgroundColor" 
           value="0xffff0000" />
</feature>
childBrowser

Disables child browser windows. By default, when the content attempts to open a resource in a new window or tab (by using window.open(), or by specifying _blank as the target of an anchor), the WebWorks app will open a secondary browser window to display the resource. This feature is enabled by default.

When name="childBrowser", the value attribute must specify a value of "disable".

Example
<feature id="blackberry.app">
    <param name="childBrowser" value="disable" />
</feature>
formControl

Disables the form control in an HTML form. The form control is a row of buttons (Previous, Next, and Submit) that the user can use to navigate through a form. By default, when a WebWorks app contains an HTML form and an <input> element gets focus, WebWorks displays a form control. This feature allows you to prevent your app from displaying the form control.

When name="formControl", the value attribute must specify a value of "disable".

Example
<feature id="blackberry.app">
    <param name="formControl" value="disable" />
</feature>
popupBlocker

Enables the popup blocker. By default, all popups are displayed by BlackBerry WebWorks apps in a child browser window. You can prevent popups from displaying without user intervention by enabling the popup blocker.

When name="popupBlocker", the value attribute must specify a value of "enable".

Example
<feature id="blackberry.app">
    <param name="popupBlocker" value="enable" />
</feature>
websecurity

Disables web security. Disabling web security allows you to access remote content from unknown sources during development. Before packaging your app for distribution, you should remove this setting.

This feature is intended as a development convenience only. In production, all URIs should be known and should be whitelisted using the <access> element.

When name="websecurity", the value attribute must specify a value of "disable".

Example
<feature id="blackberry.app">
    <param name="websecurity" value="disable" />
</feature>

Last modified: 2014-03-10



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus