IBM Worklight v5.0.5 > API reference > IBM Worklight client-side API > JavaScript client-side API > WLClient JavaScript client library

Calls to the WL server


WLClient uses asynchronous JavaScript calls to access the WL server. Each asynchronous method accepts an options parameter, which includes success and failure handlers to communicate the results of the call. To be notified when an asynchronous function returns, supply these callback functions within the options parameter when you call the function.


General application methods

Lifecycle WL.Client.init, WL.Client.reloadApp
Connectivity WL.Client.setHeartBeatInterval, WL.Client.connect, Connectivity-related JavaScript Events
Session management methods WL.Client.getUserName, WL.Client.getLoginName, WL.Client.login, WL.Client.logout, WL.Client.isUserAuthenticated, WL.Client.getUserInfo, WL.Client.updateUserInfo
Data access methods WL.Client.invokeProcedure
Activity logging methods WL.Client.logActivity
User preference methods WL.Client.setUserPref, WL.Client.getUserPref(key)
Application properties methods WL.Client.getEnvironment, WL.Client.getAppProperty
Error handling WL.App.getErrorMessage
Debugging WL.Logger object


Mobile functionality and UI

Push notification API: WL.Client.Push.isPushSupported, WL.Client.Push.isPushSMSSupported, WL.Client.Push.onReadyToSubscribe, WL.Client.Push.registerEventSourceCallback, WL.Client.Push.subscribe, WL.Client.Push.subscribeSMS, WL.Client.Push.unsubscribe, WL.Client.Push.unsubscribeSMS
Network details WL.Device.getNetworkInfo
Open a URL WL.App.openURL
Options menu WL.OptionsMenu
Tab bar WL.TabBar
Badge WL.Badge.setNumber
Toast WL.Toast.show
Globalization WL.App.getDeviceLocale, WL.App.getDeviceLanguage
Back button WL.App.overrideBackButton, WL.App.resetBackButton
Dialog box WL.SimpleDialog
Busy indicator WL.BusyIndicator (constructor)
Closing an app WL.App.close
Access native pages on mobile apps WL.NativePage.show
Switch between HTML Pages WL.Fragment.load,Class WL.Page
Encrypted offline cache WL.EncryptedCache
Clipboard WL.App.copyToClipboard


Web and desktop widget methods

Desktop window state WL.Client.onDock, WL.Client.onUndock, WL.Client.onShow, WL.Client.onHide, WL.Client.close, WL.Client.minimize
Globalization WL.Client.getLanguage


Mechanisms used by the WLClient methods


Augmented Options

The options parameter often contains additional properties applicable to the specific method that is being called. These additional properties are detailed in the description of the specific method.


Augmented Response

The success and failure handlers of all asynchronous calls always receive a response parameter that contains a common set of properties. Some calls pass additional properties in the response object of the success and failure handlers. In such cases, these additional properties are detailed in the description of the specific method.


Parent WLClient JavaScript client library





+

Search Tips   |   Advanced Search