new Ajax(approot, gateway, login, password, async)
- Description:
Simplicité® application.
Example
// Using authenticated user thru UI gateway
var app = new Simplicite.Ajax("myapp");
// Using public user thru public UI gateway
var app = new Simplicite.Ajax("myapp", "uipublic");
// Using website user thru WS gateway
var app = new Simplicite.Ajax("myapp", "ws", "myuser", "mypassword");
// Using website user thru API gateway
var app = new Simplicite.Ajax("myapp", "api", "myuser", "mypassword");
Parameters:
Name | Type | Description |
---|---|---|
approot |
Application root (either application name or /<context root> or absolute base URL) |
|
gateway |
Gateway type to use :
|
|
login |
User's login (not required for UI gateways) |
|
password |
User's password (not required for UI gateways) |
|
async |
Asynchronous calls by default (true if absent) ? |
Classes
Members
(constant) CONTEXT_ACTION :number
- Description:
Action context.
Action context.
Type:
- number
(constant) CONTEXT_AGENDA :number
- Description:
Agenda context.
Agenda context.
Type:
- number
(constant) CONTEXT_ASSOCIATE :number
- Description:
Association context.
Association context.
Type:
- number
(constant) CONTEXT_COPY :number
- Description:
Copy context.
Copy context.
Type:
- number
(constant) CONTEXT_CREATE :number
- Description:
Creation context.
Creation context.
Type:
- number
(constant) CONTEXT_CROSSTAB :number
- Description:
Cross table context.
Cross table context.
Type:
- number
(constant) CONTEXT_DATAMAPSELECT :number
- Description:
Data mapping selection context.
Data mapping selection context.
Type:
- number
(constant) CONTEXT_DELETE :number
- Description:
Delete context.
Delete context.
Type:
- number
(constant) CONTEXT_EXPORT :number
- Description:
Export context.
Export context.
Type:
- number
(constant) CONTEXT_IMPORT :number
- Description:
Import context.
Import context.
Type:
- number
(constant) CONTEXT_LIST :number
- Description:
List context.
List context.
Type:
- number
(constant) CONTEXT_NONE :number
- Description:
No context.
No context.
Type:
- number
(constant) CONTEXT_PANELLIST :number
- Description:
Panel list context.
Panel list context.
Type:
- number
(constant) CONTEXT_PLACEMAP :number
- Description:
Place map context.
Place map context.
Type:
- number
(constant) CONTEXT_POSTVALIDATE :number
- Description:
Post validate context.
Post validate context.
Type:
- number
(constant) CONTEXT_PREVALIDATE :number
- Description:
Pre-validate context.
Pre-validate context.
Type:
- number
(constant) CONTEXT_PRINTTMPL :number
- Description:
Publication template context.
Publication template context.
Type:
- number
(constant) CONTEXT_REFSELECT :number
- Description:
Reference selection context.
Reference selection context.
Type:
- number
(constant) CONTEXT_SEARCH :number
- Description:
Search context.
Search context.
Type:
- number
(constant) CONTEXT_STATETRANSITION :number
- Description:
State transition context.
State transition context.
Type:
- number
(constant) CONTEXT_UPDATE :number
- Description:
Update context.
Update context.
Type:
- number
(constant) CONTEXT_UPDATEALL :number
- Description:
Bulk update context.
Bulk update context.
Type:
- number
(constant) DEFAULT_ROW_ID :string
- Description:
Default row ID value (for creation).
Default row ID value (for creation).
Type:
- string
(constant) ERRLEVEL_ERROR :number
- Description:
Error error value
Error error value
Type:
- number
(constant) ERRLEVEL_FATAL :number
- Description:
Fatal error value
Fatal error value
Type:
- number
(constant) ERRLEVEL_WARNING :number
- Description:
Minor error value
Minor error value
Type:
- number
(constant) FALSE :string
- Description:
False value
False value
Type:
- string
(constant) GATEWAY_API :string
- Description:
API gateway
API gateway
Type:
- string
(constant) GATEWAY_UI :string
- Description:
UI gateway
UI gateway
Type:
- string
(constant) GATEWAY_UI_PUBLIC :string
- Description:
Public UI gateway
Public UI gateway
Type:
- string
(constant) GATEWAY_WS :string
- Description:
Version 3.x WS gateway
- Deprecated:
- Yes
Version 3.x WS gateway
Type:
- string
(constant) RENDERING_DEFAULT :string
- Description:
Default rendering.
Default rendering.
Type:
- string
(constant) RENDERING_HORIZCHECKBOX :string
- Description:
Rendering horizontal checkbox(es).
Rendering horizontal checkbox(es).
Type:
- string
(constant) RENDERING_HORIZRADIOBUTTON :string
- Description:
Rendering horizontal radio button(s).
Rendering horizontal radio button(s).
Type:
- string
(constant) RENDERING_SELECTBOX :string
- Description:
Select box rendering (single or multiple select).
Select box rendering (single or multiple select).
Type:
- string
(constant) RENDERING_VERTCHECKBOX :string
- Description:
Rendering vertical checkbox(es).
Rendering vertical checkbox(es).
Type:
- string
(constant) RENDERING_VERTRADIOBUTTON :string
- Description:
Rendering vertical radio button(s).
Rendering vertical radio button(s).
Type:
- string
(constant) SEARCH_MONO :number
- Description:
Searchable.
Searchable.
Type:
- number
(constant) SEARCH_MULTI_CHECK :number
- Description:
Searchable using check boxes.
Searchable using check boxes.
Type:
- number
(constant) SEARCH_MULTI_LIST :number
- Description:
Searchable using list box.
Searchable using list box.
Type:
- number
(constant) SEARCH_NONE :number
- Description:
Not searchable.
Not searchable.
Type:
- number
(constant) SEARCH_PERIOD :number
- Description:
Searchable using period.
Searchable using period.
Type:
- number
(constant) TRUE :string
- Description:
True value
True value
Type:
- string
(constant) TYPE_BIGDECIMAL :number
- Description:
Big decimal type.
Big decimal type.
Type:
- number
(constant) TYPE_BOOLEAN :number
- Description:
Boolean type.
Boolean type.
Type:
- number
(constant) TYPE_COLOR :number
- Description:
Color type.
Color type.
Type:
- number
(constant) TYPE_DATE :number
- Description:
Date type.
Date type.
Type:
- number
(constant) TYPE_DATETIME :number
- Description:
Date and time type.
Date and time type.
Type:
- number
(constant) TYPE_DOC :number
- Description:
Document type
Document type
Type:
- number
(constant) TYPE_EMAIL :number
- Description:
Email type.
Email type.
Type:
- number
(constant) TYPE_ENUM :number
- Description:
Single enumerated (list of values) type.
Single enumerated (list of values) type.
Type:
- number
(constant) TYPE_ENUM_MULTI :number
- Description:
Multiple enumerated (list of values) type.
Multiple enumerated (list of values) type.
Type:
- number
(constant) TYPE_EXTFILE :number
- Description:
External file reference type.
External file reference type.
Type:
- number
(constant) TYPE_FLOAT :number
- Description:
Float type.
Float type.
Type:
- number
(constant) TYPE_GEOCOORDS :number
- Description:
Geo coordinates type.
Geo coordinates type.
Type:
- number
(constant) TYPE_HTML :number
- Description:
HTML content type.
HTML content type.
Type:
- number
(constant) TYPE_ID :number
- Description:
Internal ID (foreign key) type.
Internal ID (foreign key) type.
Type:
- number
(constant) TYPE_IMAGE :number
- Description:
Image type.
Image type.
Type:
- number
(constant) TYPE_INT :number
- Description:
Integer type.
Integer type.
Type:
- number
(constant) TYPE_LONG_STRING :number
- Description:
Long string (unlimited) type.
Long string (unlimited) type.
Type:
- number
(constant) TYPE_NOTEPAD :number
- Description:
Notepad (incremental long text) type.
Notepad (incremental long text) type.
Type:
- number
(constant) TYPE_OBJECT :number
- Description:
Object type.
Object type.
Type:
- number
(constant) TYPE_PASSWORD :number
- Description:
Password type.
Password type.
Type:
- number
(constant) TYPE_PHONENUM :number
- Description:
Phone number type.
Phone number type.
Type:
- number
(constant) TYPE_REGEXP :number
- Description:
Regular expression type.
Regular expression type.
Type:
- number
(constant) TYPE_STRING :number
- Description:
String type.
String type.
Type:
- number
(constant) TYPE_TIME :number
- Description:
Time type.
Time type.
Type:
- number
(constant) TYPE_URL :number
- Description:
URL type.
URL type.
Type:
- number
(constant) UPD_ALWAYS :number
- Description:
Updatable in lists and forms.
Updatable in lists and forms.
Type:
- number
(constant) UPD_FORM_ONLY :number
- Description:
Updatable in forms only.
Updatable in forms only.
Type:
- number
(constant) UPD_LIST_ONLY :number
- Description:
Updatable in lists only.
Updatable in lists only.
Type:
- number
(constant) UPD_READ_ONLY :number
- Description:
Not updatable.
Not updatable.
Type:
- number
(constant) VIEW_TYPE :Object
- Description:
View item types
View item types
Type:
- Object
(constant) VIS_BOTH :number
- Description:
Visible in lists and forms.
Visible in lists and forms.
Type:
- number
(constant) VIS_FORBIDDEN :number
- Description:
Forbidden on UI
Forbidden on UI
Type:
- number
(constant) VIS_FORM :number
- Description:
Visible in forms.
Visible in forms.
Type:
- number
(constant) VIS_HIDDEN :number
- Description:
Not visible.
Not visible.
Type:
- number
(constant) VIS_LIST :number
- Description:
Visible in lists.
Visible in lists.
Type:
- number
(constant) VIS_NOT :number
- Description:
Not visible (alias to VIS_HIDDEN).
Not visible (alias to VIS_HIDDEN).
Type:
- number
appinfo
- Description:
Application info data.
- name: Application name
- version: Application version
- platformversion: Platform version
- encoding: Encoding
- server: Server vendor
- Etc.
Application info data.
- name: Application name
- version: Application version
- platformversion: Platform version
- encoding: Encoding
- server: Server vendor
- Etc.
authToken
- Description:
Server side session authentication token.
Server side session authentication token.
authTokenExpiryDate
- Description:
Server side session authentication token expiry date
Server side session authentication token expiry date
grant
- Description:
Grant data.
- login: User login
- firstname: User first name
- lastname: User last name
- responsibilities: User active responsibilites array
- Etc.
Grant data.
- login: User login
- firstname: User first name
- lastname: User last name
- responsibilities: User active responsibilites array
- Etc.
menu
- Description:
Menu data.
Menu data.
news
- Description:
News array. Use news["<code>"] to get a news object)
News array. Use news["<code>"] to get a news object)
sessionId
- Description:
Server side session identifier.
Server side session identifier.
sysparams
- Description:
System parameters array. Use sysparams["<name>"] to get a system parameter value.
System parameters array. Use sysparams["<name>"] to get a system parameter value.
texts
- Description:
Texts. Use texts["<code>"] to get a text value.
Texts. Use texts["<code>"] to get a text value.
views
- Description:
View definitions
View definitions
Methods
T(code, plural) → {string}
- Description:
Get text value (alias to
getText
).
Parameters:
Name | Type | Description |
---|---|---|
code |
string | Text code |
plural |
boolean | True to get the plural value if known |
Returns:
Text value
- Type
- string
base64Decode(s) → {Array}
- Description:
Decode a base64 string to string
Parameters:
Name | Type | Description |
---|---|---|
s |
string | Base64-encoded string |
Returns:
Decoded string
- Type
- Array
base64Encode(s) → {string}
- Description:
Encode a string to base64
Parameters:
Name | Type | Description |
---|---|---|
s |
string | Input string |
Returns:
Base64-encoded string
- Type
- string
base64EncodeArrayBuffer(b) → {string}
- Description:
Encode an array buffer (such as got from a local file read) to to base64
Parameters:
Name | Type | Description |
---|---|---|
b |
Array | Array buffer |
Returns:
Base64-encoded string
- Type
- string
changeLang(cbk, lang, params)
- Description:
change user language
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cbk |
Callback function called when completed |
|||||||||||||
lang |
language code (FRA, ENU...) |
|||||||||||||
params |
Optional parameters: Properties
|
clearCache(obj)
- Description:
Remove objects from cache
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object name or business object |
contentURL(file)
- Description:
Returns content URL.
Parameters:
Name | Type | Description |
---|---|---|
file |
string | Content file name |
dataURL(doc, thumb)
- Description:
Returns local data URL (e.g. suitable for src of img tags).
Parameters:
Name | Type | Description |
---|---|---|
doc |
Document with mime type and base64 image or thumbnail |
|
thumb |
Return document thumbnail? |
debug(msg)
- Description:
Debug handler
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | Message |
dispositionResourceURL(code, type)
- Description:
Returns disposition resource URL.
Parameters:
Name | Type | Description |
---|---|---|
code |
string | Resource code |
type |
string | Resource type (IMG=image (default), ICO=Icon, CSS=stylesheet, JS=Javascript, HTML=HTML) |
documentURL(object, field, rowId, docId, cdisp)
- Description:
Returns document URL.
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
object |
Object | string | Object name or object Properties
|
|||||||||||||||
field |
string | Field name |
|||||||||||||||
rowId |
string | Object record row ID |
|||||||||||||||
docId |
string | Document ID (can be omitted then a lookup is done on record matching rowId) |
|||||||||||||||
cdisp |
string | Disposition: attachment or inline (defaults to inline) |
editor(cbk, service, params, post)
- Description:
Editor services
Parameters:
Name | Type | Description |
---|---|---|
cbk |
function | Optional callback with result |
service |
string |
|
params |
params | Optional parameters |
post |
Object | Optional post data with document |
error(msg)
- Description:
Error handler
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | Message |
firebase(callback, data, params)
- Description:
Firebase service to send mobile notification
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
callback |
function | Optional callback |
||||||||||||||||||
data |
Object | Parameters Properties
|
||||||||||||||||||
params |
Object | parameters: Properties
|
follow(callback, params)
- Description:
Social follow service.
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | Callback |
params |
Object | parameters:
|
getAppInfo(callback, params)
- Description:
Loads application info data.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
callback |
Callback function called when loading is completed (loaded application info data is passed to this function) |
||||||||||
params |
Optional parameters: Properties
|
getAsync() → {boolean}
- Description:
Is globally asynchronous?
Returns:
True if is globally asynchronous
- Type
- boolean
getBusinessObject(obj, objInstName)
- Description:
Get a new business object.
Example
// app is a Simplicite.Ajax instance
var obj = app.getBusinessObject("MyObject");
// other instance of obj
var tmp = app.getBusinessObject(obj, "tmpObj");
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object name or business object |
|
objInstName |
Optional instance name (default the_ajax_<object name>) |
getBusinessProcess(name)
- Description:
Get a new business process.
Example
// app is a Simplicite.Ajax instance
var pcs = app.getBusinessProcess("MyProcess");
Parameters:
Name | Type | Description |
---|---|---|
name |
Business process name |
getExternalObject(callback, name, params)
- Description:
Loads external object definition.
Parameters:
Name | Type | Description |
---|---|---|
callback |
fucntion | Callback function called when loading is completed (loaded external object is passed to this function) |
name |
string | External object name |
params |
Object | Optional parameters:
|
getExternalObjectURL(name, params, embedded)
- Description:
External object URL.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Object name |
params |
Object | Optional parameters (object or string) |
embedded |
boolean | True to get a relative URL, false to get the full http URL (loadURL will create an iframe) |
getGateway() → {string}
- Description:
Get gateway
Returns:
Gateway (one of GATEWAY_*
constants)
- Type
- string
getGrant(callback, params)
- Description:
Loads grant data.
Parameters:
Name | Type | Description |
---|---|---|
callback |
Callback function called when loading is completed (loaded grant data is passed to this function) |
|
params |
Optional parameters:
|
getIconURL(name)
- Description:
Icon URL
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Resource icon name |
getMenu(callback, params)
- Description:
Loads menu data.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
callback |
Callback function called when loading is completed (loaded menu data is passed to this function) |
||||||||||
params |
Optional parameters: Properties
|
getNews(callback, params)
- Description:
Loads news.
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | Callback function called when loading is completed (loaded news array is passed to this function) |
params |
Object | Optional parameters:
|
getResourceURL(code, type, object, objId)
- Description:
Returns Object resource URL.
Parameters:
Name | Type | Description |
---|---|---|
code |
string | Resource code |
type |
string | Resource type (IMG=image (default), ICO=Icon, CSS=stylesheet, JS=Javascript, HTML=HTML) |
object |
string | Object name: ObjectInternal or ObjectExternal (for Disposition use dispositionResourceURL) |
objId |
string | Object row ID (not the resource row ID) |
getSysInfo(callback, params)
- Description:
Loads system info data.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
callback |
Callback function called when loading is completed (loaded system info data is passed to this function) |
||||||||||
params |
Optional parameters: Properties
|
getSysParam(cbk, name, params)
- Description:
Get system parameter value.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cbk |
optional callback(value) |
|||||||||||||
name |
System parameter name |
|||||||||||||
params |
Optional parameters: Properties
|
getSysParams(callback, params)
- Description:
Loads system parameters.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
callback |
Callback function called when loading is completed (loaded system parameters array is passed to this function) |
||||||||||
params |
Optional parameters: Properties
|
getText(code, plural) → {string}
- Description:
Get text value.
Parameters:
Name | Type | Description |
---|---|---|
code |
string | Text code |
plural |
boolean | True to get the plural value if known |
Returns:
Text value
- Type
- string
getTexts(callback, params)
- Description:
Loads texts.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
callback |
Callback function called when loading is completed (loaded texts array is passed to this function) |
||||||||||
params |
Optional parameters: Properties
|
getTimeout() → {string}
- Description:
Get timeout
Returns:
Timeout
- Type
- string
getUserInfo(callback, login, params)
- Description:
Loads basic user data (login, name, email, picture).
Parameters:
Name | Type | Description |
---|---|---|
callback |
Callback function called when loading is completed (loaded user data is passed to this function) |
|
login |
User login |
|
params |
Optional parameters:
|
getView(callback, name, params)
- Description:
Loads view definition.
Parameters:
Name | Type | Description |
---|---|---|
callback |
Callback function called when loading is completed (loaded view is passed to this function) |
|
name |
View name |
|
params |
Optional parameters:
|
imageURL(object, field, rowId, docId, thumb)
- Description:
Returns image URL.
Parameters:
Name | Type | Description |
---|---|---|
object |
string | Object name |
field |
string | Field name |
rowId |
string | Object record row ID |
docId |
string | Document ID |
thumb |
boolean | Return thumbnail image |
indexsearch(callback, request, params)
- Description:
Search from index.
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | Callback function with result list |
request |
string | Index search request string
|
params |
Object | Optional parameters
|
info(msg)
- Description:
Info handler
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | Message |
isFalse(value) → {boolean}
- Description:
Returns true if value is
0|false|no|n
Parameters:
Name | Type | Description |
---|---|---|
value |
string | parameter value |
Returns:
Is value false?
- Type
- boolean
isFirefox()
- Description:
Is Firefox?
Returns:
True if is Firefox
isTrue(value) → {boolean}
- Description:
Returns true if value is
1|true|yes|y
Parameters:
Name | Type | Description |
---|---|---|
value |
string | parameter value |
Returns:
Is value true?
- Type
- boolean
isWebkit()
- Description:
Is WebKit?
Returns:
True if is WebKit
isWinIE()
- Description:
Is Windows Internet Explorer?
Returns:
True if is Windows Internet Explorer
login(successCallback, failureCallback, authToken, params)
- Description:
Login (same as session()).
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
successCallback |
function | Callback function called when login is sucessful |
||||||
failureCallback |
function | Callback function called when login fails |
||||||
authToken |
string | Authentication token to (re)use (in case of a persistent token) |
||||||
params |
Object | Optional parameters: Properties
|
logout(successCallback, failureCallback, params)
- Description:
Logout (in case of a persistent token it is deleted)
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
successCallback |
function | Callback function called when login is sucessful |
||||||
failureCallback |
function | Callback function called when login fails |
||||||
params |
Object | Optional parameters: Properties
|
messageToJson(msg)
- Description:
Convert a textual backend message to json { code, text, level, field, label, error } or technical statement { redirect } or { javascript }
- code: message code
- text: optional contextual details
- level: 'I'nfo, 'W'arning, 'E'rror, 'F'atal
- field: optional field name of message
- label: default text to display in user language
- error: true when level is fatal or error
Parameters:
Name | Type | Description |
---|---|---|
msg |
formatted backend message 'code:text#level#field#param:value' or 'redirect:url' or 'javascript:code' |
module(callback, params)
- Description:
Module services
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
callback |
function | Callback |
||||||||||||||||||
params |
Object | parameters: Properties
|
monitor(m, params, cbk)
- Description:
Monitoring service
Parameters:
Name | Type | Description |
---|---|---|
m |
string | Object | Monitoring service or plain JSON object to store |
params |
Object | Optional parameters |
cbk |
function | Optional callback for response |
parseDateTimeValue(v) → {Date}
- Description:
Parse a date time value into a Javascript Date
Parameters:
Name | Type | Description |
---|---|---|
v |
string | Date time value ( |
Returns:
Javascript date
- Type
- Date
parseDateValue(v) → {Date}
- Description:
Parse a date value into a Javascript Date
Parameters:
Name | Type | Description |
---|---|---|
v |
string | Date value ( |
Returns:
Javascript date
- Type
- Date
resourceURL(resId)
- Description:
Returns resource URL.
Parameters:
Name | Type | Description |
---|---|---|
resId |
string | Resource ID (e.g. taken from business object or external object resources list in metadata) |
session(successCallback, failureCallback, authToken, params)
- Description:
Session init (retrieves server side session identifier and auth token).
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
successCallback |
function | Callback function called when session init is sucessful |
|||||||||
failureCallback |
function | Callback function called when session init fails |
|||||||||
authToken |
string | Auth token to (re)use (in case of persistent tokens) |
|||||||||
params |
Object | Optional parameters: Properties
|
setAsync(async)
- Description:
Set globallty asynchronous (is globally asynchronous by default)
Parameters:
Name | Type | Description |
---|---|---|
async |
boolean | Asynchronous? |
setDebugHandler(debugHandler)
- Description:
Change default global debug handler.
Parameters:
Name | Type | Description |
---|---|---|
debugHandler |
Debug handler function |
setDebugHandlerActive(active)
- Description:
Set default global debug handler active or inactive.
Parameters:
Name | Type | Description |
---|---|---|
active |
Active status |
setErrorHandler(errorHandler)
- Description:
Change default global error handler.
Parameters:
Name | Type | Description |
---|---|---|
errorHandler |
Error handler function |
setErrorHandlerActive(active)
- Description:
Set default global error handler active or inactive.
Parameters:
Name | Type | Description |
---|---|---|
active |
Active status |
setGateway(gateway, loginopt, passwordopt)
- Description:
Set gateway and credentials
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
gateway |
string | Gateway (one of |
|
login |
string |
<optional> |
Login |
password |
string |
<optional> |
Password |
setInfoHandler(infoHandler)
- Description:
Change default global information handler.
Parameters:
Name | Type | Description |
---|---|---|
infoHandler |
Information handler function |
setInfoHandlerActive(active)
- Description:
Set default global information handler active or inactive.
Parameters:
Name | Type | Description |
---|---|---|
active |
Active status |
setPassword(callback, password, params)
- Description:
Set password.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
callback |
Callback function called when loading is completed |
||||||||||
password |
Password |
||||||||||
params |
Optional parameters: Properties
|
setSysParam(callback, name, value, save, params)
- Description:
Set a user system parameter.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
callback |
Callback function called when loading is completed (parameter is passed to this function) |
||||||||||
name |
Parameter name |
||||||||||
value |
Parameter value (if undefined parameter is unset) |
||||||||||
save |
Save parameter in user parameters (if undefined parameter is not saved) |
||||||||||
params |
Optional parameters : Properties
|
setTimeout(timeout)
- Description:
Set timeout
Parameters:
Name | Type | Description |
---|---|---|
timeout |
number | Timeout (seconds) |
setVersionCompatibility(version)
- Description:
Set default JSON services version compatibility
Parameters:
Name | Type | Description |
---|---|---|
version |
Simplicite(R) JSON services version to be compatible with (e.g. 2.7) |
setWarningHandler(warningHandler)
- Description:
Change default global warning handler.
Parameters:
Name | Type | Description |
---|---|---|
warningHandler |
Warning handler function |
setWarningHandlerActive(active)
- Description:
Set default global warning handler active or inactive.
Parameters:
Name | Type | Description |
---|---|---|
active |
Active status |
social(callback, post, params)
- Description:
Social post service.
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | Callback |
post |
Object | optional post to save or delete |
params |
Object | Optional parameters:
|
syntax(callback, data, params)
- Description:
Syntax service: will return an object with the results
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
callback |
function | function(response) |
||||||||||||
data |
Object | parameters Properties
|
||||||||||||
params |
Object | parameters: Properties
|
toDateTimeValue(d) → {string}
- Description:
Parse a Javascript Date into a date time value
Parameters:
Name | Type | Description |
---|---|---|
d |
Date | Javascript date |
Returns:
Date time value (YYYY-MM-DD HH-mm-ss
)
- Type
- string
toDateValue(d) → {string}
- Description:
Parse a Javascript Date into a date value
Parameters:
Name | Type | Description |
---|---|---|
d |
Date | Javascript date |
Returns:
Date value (YYYY-MM-DD
)
- Type
- string
toTimeValue(d) → {string}
- Description:
Parse a Javascript Date into a time value
Parameters:
Name | Type | Description |
---|---|---|
d |
Date | Javascript date |
Returns:
Time value (HH:mm:ss
)
- Type
- string
treeview(callback, name, params)
- Description:
Treeview services
Parameters:
Name | Type | Description |
---|---|---|
callback |
Callback function called when loading is completed (loaded view is passed to this function) |
|
name |
Treeview name |
|
params |
Optional parameters:
|
warning(msg)
- Description:
Warning handler
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | Message |
winIEVersion() → {number}
- Description:
Get Windows Internet Explorer version
Returns:
Version
- Type
- number