Skip navigation links

Index Overview

PREV CLASS NEXT CLASS FRAMES (opens in new window)



Class WL.NativePage

WL.NativePage


Method Summary
Method Attributes Method Name and Description
 

show(className, callback, data)

Method Detail

show

show(className, callback, data)

Parameters:
className - Mandatory. String. The name of the native class. For iOS, the name of the class (for example, BarCodeController). For Android, the complete name of the class and package (for example, com.neebula.barcode.Scanner).
callback - Mandatory. Function. A function object that is called when the native page switches back to the web view. This function is passed a single JSON object parameter when invoked.
data - Optional. Object. A JSON object that is sent to the native class. For iOS, The data must be single string or a flat record of strings.
Deprecated:
Since version 8.0 Switches the currently displayed, web-based screen with a natively written page
Example:

// Good WL.NativePage.show("com.scan.BarCode", function(data){alert(data);}, {key1 : 'value1'}); WL.NativePage.show("com.scan.BarCode", function(data){alert(data);}, {key1 : 'value1', key2 : 'value2'}); // Bad WL.NativePage.show("com.scan.BarCode", function(data){alert(data);}, {key1 : 'value1', innerStruct : {innerKey1 : 'innervalue1'}});


© Copyright IBM Corp. 2011, 2016.