Servis-Rhino 4211B Guia do Utilizador Página 103

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 298
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 102
Client Side API Programming
A JavaScript object called "WL" is created by the Worklight framework. This can then be used as
the root or name-space for all other functions.
WL.Client
The JavaScript object called "WL" contain a child object called "Client" which acts as a container
for a set of methods related to client side functions. The following act as a guide and notes on some
of the functions available.
The common "options" object
Many of the functions documented here accept an "options" object. This object is common
amongst many of the asynchronous calls. This object contains the following properties:
onSuccess – A callback function that receives a "response" object. The response object
will contain (amongst other items):
invocationContext
status
onFailure – A callback function that is invoked if an error/failure is detected. The
function is passed a response object which will contain:
invocationContext
errorCode
errorMsg
status
invocationContext – An object which will be passed through to the response objects so that
they may have context/correlation between a call and a response. This is necessary since
many of the responses will be returned asynchronously.
WL.Client.addGlobalHeader(headerName, headerValue)
When called this method adds an HTTP header to the network connections made in all subsequent
requests to the Worklight Server.
headerName – The name of the HTTP header property to add.
headerValue – The value of the HTTP header property to add.
See also:
WL.Client.removeGlobalHeader(headerName)
WL.Client.close()
This method closes a widget in the Adobe AIR environment.
Page 103
Vista de página 102
1 2 ... 98 99 100 101 102 103 104 105 106 107 108 ... 297 298

Comentários a estes Manuais

Sem comentários