new Engine
Main UI Controller with abstract view to display components.
- Controller implements the UI logic with interactions between components (list, form, menu...) and the data (ajax).
- It does not contain UI drawing and must load the view service to display controls.
- Each View engine implements the UI interfaces (without data access) and interacts with the controller (to access to data).
- Source:
- controller.js, line 30
Members
-
FILE_ICONS
-
Common file extension icon
- Source:
- controller.js, line 8461
-
grant
-
User rights
- Source:
- controller.js, line 137
-
KEYS
-
Common key codes
- BACKSPACE
- TAB
- ENTER
- SHIFT
- CTRL
- ALT
- PAUSE
- CAPS_LOCK
- ESCAPE
- PAGE_UP
- PAGE_DOWN
- END
- HOME
- LEFT_ARROW
- UP_ARROW
- RIGHT_ARROW
- DOWN_ARROW
- INSERT
- DELETE
- Source:
- controller.js, line 8435
-
MEDIA_SIZE
-
Media sizes (XS=544, SM=768, MD=992, LG=1200)
- Source:
- controller.js, line 3000
-
options
-
global options: merge of the launch parameters with Simplicite.UI.Globals
- Source:
- controller.js, line 44
-
screenSize
-
Current screen size {w,h}
- Source:
- controller.js, line 3042
-
view
-
View main renderer
- Source:
- controller.js, line 143
Methods
-
addLocalLogin
-
Add a login to local storage
- Source:
- controller.js, line 852
-
addShortcuts
-
Add keys shortcuts to document
Parameters:
Name Type Description keys
object pair of ('ctrl' | 'shift' | 'alt') + letter or char-code = callback or shortcut definition - Source:
- controller.js, line 1215
-
alert
-
Alert dialog box
Parameters:
Name Type Description params
string | object message or object with: Properties
Name Type Description name
string optional name title
string optional title, default "ALERT" type
string optional 'error|danger|warning|info' content
string | jQuery optional alert body help
string | jQuery optional help onOk
function optional callback on "OK" button dontAskAgain
string use the 'dont't ask again' local storage (true=keep user's action or string=forced response), needs a name toast
boolean true to display a toast instead a dialog modal
boolean true to display a modal dialog - Source:
- controller.js, line 1515
-
applyConstraints
-
Apply constraints
Parameters:
Name Type Description ctn
jquery Container obj
Simplicite.Ajax.BusinessObject Object elt
string Optional DOM element (input, select, textarea) with data {field, index} index
string Optional editlist line index (row Id or creation index 00 01...) context
number Optional context (default Simplicite.CONTEXT_UPDATE) cbk
function Optional callback - Source:
- controller.js, line 6731
-
backendException
-
Back-end exception
Parameters:
Name Type Description msg
string | object | array Simple text or { level, message or messages }, or first item of array - Source:
- controller.js, line 2229
-
backendMessage
-
Back-end message(s)
Parameters:
Name Type Description msg
string | object | array plain text / encoded message (code:text#level) / object { code, level, text, label } / or array of messages toast
boolean true to display a toast instead a dialog box title
string optional title - Source:
- controller.js, line 2206
-
backendMessages
-
Back-end messages in a single dialog
Parameters:
Name Type Description msgRow
object row id = array of backend messages - Source:
- controller.js, line 2181
-
bind
-
Bind one UI action with implementation
Parameters:
Name Type Description name
string action name fn
function handler - Source:
- controller.js, line 2361
-
bindChange
-
Attach change event to fields
- set the hasChanged on object
- apply related constraints
- exclude elements with class
js-ignore-haschanged
Parameters:
Name Type Description ctn
jquery container obj
Simplicite.Ajax.BusinessObject | Simplicite.Ajax.BusinessProcess Object or Process selector
string optional selector (default: input, select and textarea) - Source:
- controller.js, line 6702
-
bindEnabled
-
Enable action binding
Parameters:
Name Type Description name
string action name enable
boolean true to activate / false to disable binding - Source:
- controller.js, line 2375
-
bindGenericActions
-
Bind generic actions (create, copy, delete...)
- Source:
- controller.js, line 2687
-
bindSaveAndQuit
-
Manage the save and close when fields have changed
Parameters:
Name Type Description ctn
jquery Container obj
Simplicite.Ajax.BusinessObject | Simplicite.Ajax.BusinessProcess Object or Process p
object parameters { msg, msgRow } save
function save handler - Source:
- controller.js, line 6771
-
canCloseContent
-
Checks if the content can close
Parameters:
Name Type Description ctn
jquery container cbk
function callback if the content can close - Source:
- controller.js, line 6668
-
clearCache
-
System clear cache
Parameters:
Name Type Description action
string cc|dc|gc for server, all sessions or granted user - Source:
- controller.js, line 7297
-
clickDocument
-
Click on a document: open the document
Parameters:
Name Type Description doc
object document data Properties
Name Type Description object
object object name field
object doc field name rowId
object row ID docId
object document ID name
object document name - Source:
- controller.js, line 5939
-
clickImage
-
Click on image: default open a dialog with the image
Parameters:
Name Type Description doc
object image data Properties
Name Type Description object
object object name field
object doc field name rowId
object row ID docId
object image ID name
object image name - Source:
- controller.js, line 5981
-
clickMenu
-
Main menu handler
Parameters:
Name Type Description item
object Menu item Properties
Name Type Description label
string displayed label object
string optional object name state
string optional object state filter search
string optional search mode: list, dock or dialog workflow
string optional screenflow name process
string optional process name step
string optional step filter bam
string optional object name for metrics view tray
string optional object name for trays view domain
string optional domain home view
string optional view name href
string optional URL target
string optional href target - Source:
- controller.js, line 1272
-
clickReference
-
Click on a reference: default displayForm
Parameters:
Name Type Description ctn
string | jquery Target container obj
string | Simplicite.Ajax.BusinessObject name or Business Object rowId
string Referenced row ID - Source:
- controller.js, line 5250
-
clickShortcut
-
Shortcut handler
Parameters:
Name Type Description item
{ url, target, label } - Source:
- controller.js, line 1201
-
closeForm
-
Close the object form: default going back in navigation if the container can close
Parameters:
Name Type Description ctn
jquery Container obj
Simplicite.Ajax.BusinessObject Business object rowId
string object row ID - Source:
- controller.js, line 7757
-
compat
-
Forward compatibility: wrap legacy API to UI (getTop, openInFrame...)
Parameters:
Name Type Description w
object optional window silent
boolean ignore console message nodlg
boolean ignore dialog - Source:
- controller.js, line 8557
-
confirm
-
Confirm dialog box
Parameters:
Name Type Description params
string | object message or object with: Properties
Name Type Description name
string optional name title
string optional title, default "CONFIRM" content
string | jQuery optional alert body help
string | jQuery optional help onOk
function optional callback on "OK" button onCancel
function optional callback on "CANCEL" button dontAskAgain
string use the 'dont't ask again' local storage (true=keep user's action or string=forced response), needs a name - Source:
- controller.js, line 1588
-
contentLoaded
-
Prepare content handlers
Parameters:
Name Type Description ctn
jquery container onload
function optional load handler onunload
function optional unload handler params
boolean optional context parameters - Source:
- controller.js, line 6639
-
copyToClipboard
-
Copy a text to clipboard
Parameters:
Name Type Description text
string text to copy silent
boolean hide the toast - Source:
- controller.js, line 2256
-
countList
-
Count rows with context and filters
Parameters:
Name Type Description ctn
string | jquery Container obj
string | Simplicite.Ajax.BusinessObject name or Business Object options
Simplicite.UI.Globals.list options to override Globals cbk
function Optional callback(obj) to read obj.count - Source:
- controller.js, line 4137
-
countReference
-
Count references of a parent object in PANELLIST context
Parameters:
Name Type Description obj
string referenced object name or business object parent
object specify the parent object and the foreign-key { name, inst, field, rowId } cbk
function Callback(obj, count) - Source:
- controller.js, line 5005
-
createReference
-
Create an object in a dialog
Parameters:
Name Type Description ctn
string | jquery Parent container to populate obj
string | Simplicite.Ajax.BusinessObject Object ref
string | Simplicite.Ajax.ObjectField Referenced field or FK itself index
string Optional row index (edit list) - Source:
- controller.js, line 5440
-
datamapCompletion
-
Datamap completion
Parameters:
Name Type Description ctn
jQuery Container obj
Simplicite.Ajax.BusinessObject Object field
string | Simplicite.Ajax.ObjectField Referenced field index
string Optional row index (edit list) sel
function Optional select item callback(item) disp
function Optional display item callback(item, ref) - Source:
- controller.js, line 6946
-
decodeImage
-
Convert bytes to Image (supports gif, png and jpeg)
Parameters:
Name Type Description buffer
array image as bytes {function]
onload - optional callback - Source:
- controller.js, line 8493
-
detachURL
-
Open the url in a separate window with the UI engine
Parameters:
Name Type Description ctn
string | jquery parent container url
string URL to load in a new window options
object detach options Properties
Name Type Description name
string optional window name (default "detachurl") width
number optional window width in px (default 1200) height
number optional window height in px (default 900) top
number optional window top in px (default 0) left
number optional window left in px (default 0) full
boolean true to load the main parts (menu, header... default load the URL in div.main without parts) - Source:
- controller.js, line 1769
Returns:
new window -
dispatchMessages
-
Set visible field messages and returns other/head messages
Parameters:
Name Type Description messages
(string | object)[] Backend messages code:text#level[#field] (or json object) obj
Simplicite.Ajax.BusinessObject Optional object to affect message when #field matches - Source:
- controller.js, line 7397
-
displayAssociate
-
Bulk association between objects
Parameters:
Name Type Description ctn
string | jquery Parent container obj
Simplicite.Ajax.BusinessObject Object from panel instance def
object Associate definition Properties
Name Type Description parent
string parent object name parentRefField
string foreign key field to parent child
string optional child object name (when obj is a N,N relationship) childRefField
string foreign key field to child - Source:
- controller.js, line 5675
-
displayCalendar
-
Calendar rendering
Parameters:
Name Type Description ctn
string | jquery Container obj
string | Simplicite.Ajax.BusinessObject name or Business object agenda
string Agenda name params
object Options cbk
function Optional callback - Source:
- controller.js, line 7893
-
displayColorPicker
-
Color picker
Parameters:
Name Type Description ctn
string | jquery Container input
string | jquery element to receive selected color as #RRGGBB dropdown
boolean displays as dropdown or dialog box cbk
function optional callback(color,valid) - Source:
- controller.js, line 8402
-
displayCompletion
-
Field completion on field
Parameters:
Name Type Description ctn
string | jquery Container obj
string | Simplicite.Ajax.BusinessObject) Object or name field
string | Simplicite.Ajax.ObjectField) Field or name index
string Optional row index (edit list) req
string User request cbk
function Callback with search result - Source:
- controller.js, line 6872
-
displayCrosstab
-
Crosstab
Parameters:
Name Type Description ctn
string | jQuery Container obj
string | Simplicite.Ajax.BusinessObject name or Object name
string Crosstab name options
object { inst, filters, options, nav, showNav } Properties
Name Type Description inst
string instance of object filters
object optional filters to limit crosstab data options
object optional crosstab options { zstotal, zstcolor, zcaption, ztable, zgraph... } cbk
function optional callback - Source:
- controller.js, line 4301
-
displayEditor
-
Code editor
Parameters:
Name Type Description ctn
jquery Container options
object optional parameters { showNav, nav } cbk
function optional callback - Source:
- controller.js, line 7017
-
displayForm
-
Build a form with the object item
Parameters:
Name Type Description ctn
string | jquery Target container obj
string | Simplicite.Ajax.BusinessObject Object rowId
string row ID to get options
Simplicite.UI.Globals.form options to override globals cbk
function Optional callback(obj, params) - Source:
- controller.js, line 6053
-
displayHelp
-
Object help: call the help service and open a dialog
Parameters:
Name Type Description ctn
string | jquery Parent container obj
Simplicite.Ajax.BusinessObject Object - Source:
- controller.js, line 5999
-
displayHome
-
Home page
Parameters:
Name Type Description ctn
string | jquery Container options
object { nav, showNav } cbk
function optional callback - Source:
- controller.js, line 1373
-
displayImportCSV
-
Manage import CSV thru UI
Parameters:
Name Type Description ctn
string | jquery optional container - Source:
- controller.js, line 4691
-
displayImportXML
-
Manage import XML thru UI
Parameters:
Name Type Description ctn
string | jquery optional container - Source:
- controller.js, line 4635
-
displayIndex
-
Index search form
Parameters:
Name Type Description ctn
string | jquery Container options
object Options Properties
Name Type Description title
string search title, the request by default nav
string 'add' or 'new' (default) showNav
boolean display the navigation railway, default true object
string optional business object to limit search domain
string optional domain search cbk
function optional callback - Source:
- controller.js, line 4413
-
displayIndexSearch
-
Index search result
Parameters:
Name Type Description ctn
string | jquery Container req
string User request (see Simplicite.Ajax.indexsearch service) options
object { object, nav, showNav } cbk
function optional callback - Source:
- controller.js, line 4513
-
displayIndexSearchDocs
-
Index search in documents
Parameters:
Name Type Description ctn
string | jquery Container for result req
string user request list
string[] Array of objects with documents options
object { object, nav, showNav } - Source:
- controller.js, line 4495
-
displayIndexSearchDomain
-
Index search in domain
Parameters:
Name Type Description ctn
string | jquery Container for result domain
string Domain name all
boolean false to limit search to objects updated by the user options
object { object, nav, showNav } - Source:
- controller.js, line 4478
-
displayIndexSearchSession
-
Session index
Parameters:
Name Type Description ctn
string | jquery Container for result - Source:
- controller.js, line 4453
-
displayList
-
Build a list with the object search
Parameters:
Name Type Description ctn
string | jquery Target container obj
string | Simplicite.Ajax.BusinessObject name or Business Object options
Simplicite.UI.Globals.list options to override Globals cbk
function Optional callback - Source:
- controller.js, line 3669
-
displayMerge
-
Merge
Parameters:
Name Type Description ctn
string | jQuery Container obj
string | Simplicite.Ajax.BusinessObject name or Object options
object { inst, nav, showNav } cbk
function optional callback - Source:
- controller.js, line 5916
-
displayModeler
-
Load and display the modeler
Parameters:
Name Type Description ctn
string | jquery Container modelId
string model row ID options
object { svg, docked, popup } - Source:
- controller.js, line 8216
-
displayMonitoring
-
Monitoring
Parameters:
Name Type Description params
object Options Properties
Name Type Description docked
boolean dock monitoring on bottom tabIndex
number tab to focus cbk
function Optional callback - Source:
- controller.js, line 8061
-
displayPlaceMap
-
Placemap service
Parameters:
Name Type Description ctn
string | jquery container to append the map params
object static image { lat, lng, width, height } or dynamic placemap { object, inst, name, nav } cbk
function optional callback when the map is loaded - Source:
- controller.js, line 8239
-
displayPreferences
-
Object preferences
Parameters:
Name Type Description ctn
string | jquery Container obj
string | Simplicite.Ajax.BusinessObject name or Business Object - Source:
- controller.js, line 7353
-
displayPrint
-
Display a print/publication
Parameters:
Name Type Description ctn
string | jquery optional container (_blank if null) name
string Print name obj
Simplicite.Ajax.BusinessObject object rowId
string optional row ID cbk
function Optional callback - Source:
- controller.js, line 4606
-
displayReferenceList
-
Display referenced object as panel list or pillbox
Parameters:
Name Type Description ctn
string | jquery Container obj
string | Simplicite.Ajax.BusinessObject referenced object or name params
Simplicite.UI.Globals.list list options + parent object + link metadata Properties
Name Type Description parent
object parent object { name, inst, field, rowId, object } link
object optional link metadata with { child, childfk, rendering } - Source:
- controller.js, line 5202
-
displayReferencePillbox
-
Display references in a pillbox control
Parameters:
Name Type Description ctn
string | jquery Container o
Simplicite.Ajax.BusinessObject N,N object params
Simplicite.UI.Globals.list Reference data Properties
Name Type Description parent
object parent object { name, inst, field, rowId, object } link
object link metadata with child name and child foreign-key read
boolean read only? title
string optional link title (empty = no title) - Source:
- controller.js, line 5029
-
displayRow
-
Build a record of list
Parameters:
Name Type Description ctn
string | jQuery Nav container elt
string | jQuery row container (tr or div) obj
Simplicite.Ajax.BusinessObject Object rowId
string Object row Id options
Simplicite.UI.Globals.list list options to override global row options cbk
function Optional callback to chain something - Source:
- controller.js, line 4178
-
displaySearch
-
Search form
Parameters:
Name Type Description ctn
string | jquery Parent container obj
string | Simplicite.Ajax.BusinessObject name or Business Object options
Simplicite.UI.Globals.search options to override Globals cbk
function Optional callback - Source:
- controller.js, line 3541
-
displaySocial
-
Displays social posts
Parameters:
Name Type Description ctn
string | jquery Container options
object social options Properties
Name Type Description object
string optional object to limit search rowId
string optional object ID to limit search activity
boolean true to display object activities onpost
function social service(item) to upsert post ondel
function social service(id) to delete post onlist
function social service(page,act) to search posts onlike
function social service(id,like) to (un)like a post onfollow
function follow service embedded
function default false = modal dialog cbk
function optional callback - Source:
- controller.js, line 7082
-
displayStatusMetrics
-
Status metrics
Parameters:
Name Type Description ctn
string | jquery Container obj
string | Simplicite.Ajax.BusinessObject name or Business object params
object Options Properties
Name Type Description fromDate
string from date search YYYY-MM-DD, default 1 week ago or obj.locals.ui.metrics.fromDate toDate
string to date search YYYY-MM-DD, default today or obj.locals.ui.metrics.toDate period
string group by period: 1=hour, 2=day, 3=week, 4=month, 5=quarter, 6=semester, 7=year / default 2=day or obj.locals.ui.metrics.period palette
string palette name, default sysparam CHART_PALETTE or obj.locals.ui.metrics.palette cbk
function Optional callback - Source:
- controller.js, line 7970
-
displaySummary
-
Object summary
Parameters:
Name Type Description ctn
string | jquery Container obj
string | Simplicite.Ajax.BusinessObject Object rowId
string Object row ID options
object optional parameters Properties
Name Type Description inst
string optional instance name icon
boolean display the object icon or image thumbnail, default true image
boolean display the object image if any, default true label
string optional label, default: object label userKey
string optional user key, default: object user key fields
Simplicite.Ajax.ObjectField[] optional array of fields to display onopen
function optional handler on open, default: engine.openObject actions
object[] optional array of actions, default row actions item
object optional object values cbk
function Callback to chain - Source:
- controller.js, line 3378
-
displaySysInfos
-
System informations
Parameters:
Name Type Description ctn
string | jquery Container options
object Options { action, objdt, cache } - Source:
- controller.js, line 7315
-
displayTemplate
-
Template editor
Parameters:
Name Type Description ctn
string | jquery Container obj
string ObjectInternal or View rowId
string object/view ID - Source:
- controller.js, line 8318
-
displayTray
-
Trays based on a state model
Parameters:
Name Type Description ctn
string | jquery Container obj
string | Simplicite.Ajax.BusinessObject name or Business object options
object Optional parameters cbk
function Optional callback - Source:
- controller.js, line 7785
-
displayTreeView
-
Display a tree view
Parameters:
Name Type Description ctn
string | jquery optional container obj
Simplicite.Ajax.BusinessObject Root object rowId
string Row ID of the record name
string Treeview name options
object Optional parameters { inst, depth, display, menu, docked, onOpen, addMenu, delMenu, onPage } Properties
Name Type Description inst
string optional instance name (default tree_ajax_[tvname]_[object]) depth
number max deep search (default 2) menu
boolean add the tree in main menu (default open in container) docked
boolean open tree in left dock (default open in container) display
function optional to override default menu.treeview renderer onOpen
function optional open node handler(n,cbk) addMenu
function optional add to menu handler delMenu
function optional remove from menu handler onPage
function optional add page handler cbk
function Optional callback - Source:
- controller.js, line 4753
-
displayUpdateForm
-
Build a form for bulk update
Parameters:
Name Type Description ctn
string | jquery Target container obj
string | Simplicite.Ajax.BusinessObject name or Object options
object see Globals.form cbk
function Optional callback - Source:
- controller.js, line 6491
-
displayUserFilters
-
Display the user filters: date range and fields
Parameters:
Name Type Description ctn
string | jquery optional container (dialog if null) options
object { bar } - Source:
- controller.js, line 4576
-
displayView
-
Display a view
Parameters:
Name Type Description ctn
string | jquery Container view
string | object View definition or name options
object view options Properties
Name Type Description home
boolean true on main/domain home view (to get home instance of objects) parent
object when view has a parent object nav
string 'new' or 'add' showNav
boolean true to display the nav beforeload
function optional before load callback onload
function optional onload callback onunload
function optional unload callback cbk
function Optional callback - Source:
- controller.js, line 1418
-
displayWorkflow
-
Workflow wrapper
Parameters:
Name Type Description ctn
string | jquery Container wkf
string | Simplicite.Ajax.BusinessProcess Business process or name action
string start, abort, lock, unlock, validate, cancel, back, list options
object optional activity { step } cbk
function Optional callback - Source:
- controller.js, line 8169
-
doAction
-
Execute one action
Parameters:
Name Type Description a
object Action metadata obj
Simplicite.Ajax.BusinessObject Business object rowId
string Optional object row ID on form/row - Source:
- controller.js, line 2421
-
doActionCustom
-
Execute a custom/backend action (object.action call) after saving the form
Parameters:
Name Type Description a
object Action metadata obj
Simplicite.Ajax.BusinessObject Business object rowId
string Optional object row ID on form/row values
object Optional confirm field values - Source:
- controller.js, line 2491
-
doActionGeneric
-
Execute a generic/UI action (all binded implementations)
Parameters:
Name Type Description a
object Action metadata obj
Simplicite.Ajax.BusinessObject Business object rowId
string Optional object row ID on form/row - Source:
- controller.js, line 2672
-
doActionModel
-
Wrap "open model" actions
- Source:
- controller.js, line 2596
-
doActionURL
-
Wrap a backend URL action to front
Parameters:
Name Type Description a
object Action metadata obj
Simplicite.Ajax.BusinessObject Business object rowId
string Optional object row ID on form/row - Source:
- controller.js, line 2550
-
error
-
Error dialog box
Parameters:
Name Type Description msg
string content - Source:
- controller.js, line 1712
-
findAction
-
Find an action in plain or plus actions
Parameters:
Name Type Description o
Simplicite.Ajax.BusinessObject Object name
string Action name list
object[] list of actions plus
object[] list of 'plus' actions - Source:
- controller.js, line 7423
-
firebase
-
Firebase service wrapper
Parameters:
Name Type Description data
object Service data Properties
Name Type Description config
object init web browser to receive notifiction token
object add the device token to FIREBASE_TOKENS on server side tap
object incoming notification has been tapped by user? body
object optional received message title
object optional message title from
object optional message origin message
object message to send on server-side to
object recipients { users:[], groups:[] } or 'all' users - Source:
- controller.js, line 2290
-
fkCompletion
-
Foreign-key completion
Parameters:
Name Type Description ctn
jquery Container obj
Simplicite.Ajax.BusinessObject) Object field
string | Simplicite.Ajax.ObjectField) Referenced field index
string Optional row index (edit list) sel
function select item callback disp
function display item callback - Source:
- controller.js, line 6895
-
getAjax
-
Current ajax session
- Source:
- controller.js, line 105
Returns:
Simplicite.Ajax instance -
getApp
-
Current ajax session (alias to getAjax)
- Source:
- controller.js, line 111
Returns:
Simplicite.Ajax instance -
getFileIcon
-
Get icon from the file name
- Source:
- controller.js, line 8480
-
getLocalLogins
-
All logins from local storage
- Source:
- controller.js, line 840
-
getNav
-
Current navigation
- Source:
- controller.js, line 118
Returns:
Simplicite.UI.Navigator instance -
getNavContainer
-
Find the closest container with a navigator
Parameters:
Name Type Description c
string | jQuery component - Source:
- controller.js, line 128
-
getNavInstanceName
-
Generate the instance name within the component navigator. Returns the common instance name on main navigation, otherwise add a suffix ex: the_ajax_(name)_nav(id)
Parameters:
Name Type Description c
string | jQuery component obj
string | Simplicite.Ajax.BusinessObject Object name or BusinessObject inst
string optional instance name, default = the_ajax_(name) - Source:
- controller.js, line 3274
-
getNavObject
-
Get a business object extended with UI abilities per container navigator
- obj.metadata: object metadata with extended ObjectField
- obj.ui: this UI engine shorthand
- obj.locals.ui: copy of global UI options, to be changed per instance
- optional editors: load Ace and/or Tinymce
- optional web resources: STYLES and SCRIPT
- optional UI constraints script
Parameters:
Name Type Description ctn
string | jQuery Container obj
string | Simplicite.Ajax.BusinessObject Object name or BusinessObject inst
string Optional instance name, default is the_ajax_name to be managed as a Main and Ajax object on server side cbk
function Callback function(obj) when loaded params
object Optional parameters to load metadata { container, context, contextParam, parent, error } - Source:
- controller.js, line 3132
-
getTop
-
Top Simplicite window
- Source:
- controller.js, line 8517
-
getUIAction
-
Gets the action with UIAction interface
Parameters:
Name Type Description ctn
string | jquery Container obj
Simplicite.Ajax.BusinessObject Object action
object Action metadata or name - Source:
- controller.js, line 3305
-
getUIArea
-
Gets the area with UIArea interface
Parameters:
Name Type Description ctn
string | jquery Container obj
Simplicite.Ajax.BusinessObject Object area
object Area metadata or name or position - Source:
- controller.js, line 3315
-
getUIField
-
Gets the field extended with the UIField interface
Parameters:
Name Type Description ctn
string | jquery Container obj
Simplicite.Ajax.BusinessObject Object field
string | Simplicite.Ajax.ObjectField Object field or name index
string optional for multiple inputs of the same field (edit list) silent
boolean no trace when field is unknown - Source:
- controller.js, line 3295
-
getUIObject
-
Get a business object extended with UI abilities:
- obj.metadata: object metadata with extended ObjectField
- obj.ui: this UI engine shorthand
- obj.locals.ui: copy of global UI options, to be changed per instance
- optional editors: load Ace and/or Tinymce
- optional web resources: STYLES and SCRIPT
- optional UI constraints script
Parameters:
Name Type Description obj
string | Simplicite.Ajax.BusinessObject Object name or BusinessObject inst
string Optional instance name, default is the_ajax_name to be managed as a Main and Ajax object on server side cbk
function Callback function(obj) when loaded params
object Optional parameters to load metadata { container, context, contextParam, parent, error } - Source:
- controller.js, line 3110
-
getUIView
-
Gets the view with UIView interface
Parameters:
Name Type Description ctn
string | jquery Container obj
Simplicite.Ajax.BusinessObject optional object view
object View metadata or name - Source:
- controller.js, line 3325
-
gotoDefinition
-
Open one object definition if granted
Parameters:
Name Type Description name
string Object name (Field...) id
string object id - Source:
- controller.js, line 3349
-
info
-
Information dialog box
Parameters:
Name Type Description msg
string content - Source:
- controller.js, line 1703
-
isActionBinded
-
Is action binded ?
Parameters:
Name Type Description a
object action metadata - Source:
- controller.js, line 2410
Returns:
true if the action is binded -
isBinded
-
Is UI action binded and enabled ?
Parameters:
Name Type Description name
string action name - Source:
- controller.js, line 2398
Returns:
true if the action is enabled -
isFirefox
-
Checks if user agent is Firefox?
- Source:
- controller.js, line 1729
-
isMediaDesktop
-
Is the media a desktop ?
- Source:
- controller.js, line 3036
-
isMediaMobile
-
Is the media a mobile ?
- Source:
- controller.js, line 3026
-
isMediaTablet
-
Is the media a tablet ?
- Source:
- controller.js, line 3031
-
keepAlive
-
Keep the session alive during data updates (used by form and edit list)
Parameters:
Name Type Description enable
boolean true to start the timer, false to stop - Source:
- controller.js, line 810
-
linkedLists
-
Reload the linked lists of an enum field
Parameters:
Name Type Description ctn
string | jquery Container obj
Simplicite.Ajax.BusinessObject Object field
Simplicite.Ajax.ObjectField Enum field code
string | array Selected value(s) index
string Edit list index cbk
function function(target) to rebuild each target field with the new listOfValues all
boolean Get all values when code is empty (case of a search field) - Source:
- controller.js, line 6823
-
loadAceEditor
-
Load ACE editor
Parameters:
Name Type Description cbk
function optional callback - Source:
- controller.js, line 477
-
loadCalendar
-
Calendar loading from /scripts/fullcalendar. Needs sysparam FULLCALENDAR_VERSION = "3" or "4" (default 3 for backward compatibility)
Parameters:
Name Type Description cbk
function Optional callback - Source:
- controller.js, line 7840
-
loadCharts
-
Load chart.js libs
- Source:
- controller.js, line 7804
-
loadCSS
-
Load a server CSS
Parameters:
Name Type Description p
object Parameters Properties
Name Type Description url
string script location inline
boolean true to inline the styles in header (default add a link to the stylesheet) async
boolean asynchronous ? true by default onload
function optional callback when loaded silent
string true for no logging (not found 404) force
string ignore the local cache - Source:
- controller.js, line 272
-
loadDiagramEngine
-
Load the diagram engine (SVG)
Parameters:
Name Type Description cbk
function Optional callback - Source:
- controller.js, line 8189
-
loadEditor
-
External editor loading
Parameters:
Name Type Description editor
object editor parameters Properties
Name Type Description name
string unique name url
string URL of editor script onload
function optional handler to init the editor {function)
cbk - callback when loaded - Source:
- controller.js, line 457
-
loadEngine
-
Load the Rendering engine
Parameters:
Name Type Description name
string extension name (ex: bootstrap) cbk
function onload callback - Source:
- controller.js, line 577
-
loadGridJson
-
Grid tool for JSON in a table
Parameters:
Name Type Description cbk
function optional callback - Source:
- controller.js, line 561
-
loadPart
-
Load a HTML/JS/CSS resource in the target selector
Parameters:
Name Type Description p
object Parameters Properties
Name Type Description name
string resource name url
string or resource URL type
string "HTML", "CSS" or "JS" (or URL extension) target
string optional selector to append the "HTML" part onload
function optional callback when loaded silent
string true for no logging (not found 404) force
string ignore the local cache - Source:
- controller.js, line 385
-
loadParts
-
Load HTML/JS/CSS resources
Parameters:
Name Type Description list
array list of parts [{ name, url, type, target }] {function)
cbk - callback when loaded - Source:
- controller.js, line 433
-
loadResource
-
Load a disposition resource and replace [ROOT] tokens
Parameters:
Name Type Description p
object Parameters Properties
Name Type Description url
string script location async
boolean asynchronous ? true by default onload
function optional callback when loaded silent
string true for no logging (not found 404) - Source:
- controller.js, line 346
-
loadScript
-
Load a server JavaScript
Parameters:
Name Type Description p
object minimal parameter { url } Properties
Name Type Description url
string script location encoding
string optional, default 'UTF-8' async
string asynchronous call, true by default onload
string optional callback when loaded silent
string true for no logging (not found 404) force
string ignore the local cache - Source:
- controller.js, line 175
-
loadScripts
-
Load a list of JS scripts (preserve ordering)
Parameters:
Name Type Description list
object[] list of scripts onload
function callback - Source:
- controller.js, line 246
-
loadSelectBox
-
Load the select box component (see https://select2.org)
Parameters:
Name Type Description cbk
function optional callback - Source:
- controller.js, line 532
-
loadTinyMCE
-
Load TinyMCE editor
Parameters:
Name Type Description cbk
function optional callback - Source:
- controller.js, line 497
-
loadURL
-
Load URL in a container: wrap the URL to specific controllers (list, form...) or call the back-end thru ajax
Parameters:
Name Type Description ctn
string | jquery Container to load the URL (default is #work) url
string URL to load options
object contextual parameters Properties
Name Type Description label
string optional label to display in nav/dialog/download target
string optional target _blank, _top or _popup nav
string optional navigation add or new showNav
boolean show or hide the navigation object
object optional object of action rowId
object optional object row ID (form/row action) item
object optional object item (form/row action) noiframe
boolean optional flag to inline content cbk
function Optional callback when loaded - Source:
- controller.js, line 1796
-
logout
-
Default logout: confirm (with text CONFIRM_LOGOUT) and save session before quit
Parameters:
Name Type Description params
object logout parameters Properties
Name Type Description confirm
boolean true to confirm the logout url
string optional new location URL login
string optional user login to switch session token
string optional user token to switch session legacy
boolean true to return to legacy UI - Source:
- controller.js, line 766
-
main
-
Displays all site parts:
- Create main div
- load only options.resources if specified
- load part MAIN/HEADER/FOOTER/MENU/WORK when options.useMainParts=true
- load STYLES + SCRIPT resources of disposition or object
Parameters:
Name Type Description cbk
function Final callback when displayed - Source:
- controller.js, line 970
-
mediaSize
-
Get the media size
Parameters:
Name Type Description w
number viewport width - Source:
- controller.js, line 3011
Returns:
media size -
monitor
-
UI monitoring
Parameters:
Name Type Description ctn
jQuery Container to monitor params
object Parameters or action Properties
Name Type Description ui
boolean Front or Ajax call - Source:
- controller.js, line 920
-
onFollow
-
Follow service wrapper
Parameters:
Name Type Description method
string method name param
string method param cbk
function optional callback - Source:
- controller.js, line 7284
-
onMessageReceived
-
Firebase default handler when a message is received thru FCM or worker.
Parameters:
Name Type Description m
object Message or notification Properties
Name Type Description notification
string optional embedded message with title and body body
string message body title
string optional title priority
string optional priority 'high' | 'normal' | 'low' data
object optional pairs of key-value (may be present on top of message) Properties
Name Type Description object
string optional object name rowId
string optional object rowId tap
string foreground or background icon
string optional icon color
string optional color - Source:
- controller.js, line 2319
-
openObject
-
Open handler (on a list row or summary): default switch to open object form, reference, doc or image
Parameters:
Name Type Description ctn
string | jquery Container obj
Simplicite.Ajax.BusinessObject | String Target object or name rowId
string Target row ID params
Object Optional parameters Properties
Name Type Description object
Simplicite.Ajax.BusinessObject Source object rowId
string Source row ID ref
string reference object name refId
string with the reference row ID field
string or the doc/image field name docId
string with document ID imageId
string or image ID preview
string preview document? - Source:
- controller.js, line 4875
-
openURL
-
Open the URL in a new window
Parameters:
Name Type Description url
string URL to open target
string optional, default '_blank' - Source:
- controller.js, line 1739
-
populateReference
-
Populate the referenced fields
Parameters:
Name Type Description ctn
string | jquery Container obj
Simplicite.Ajax.BusinessObject Object refField
string Foreign key field refId
string Reference row ID, or null to reset referenced fields index
string Optional row index (edit list) cbk
function optional callback noChange
boolean optional to bypass change events on each fields userKey
boolean optional to get foreign user-key - Source:
- controller.js, line 5389
-
previewDocument
-
Preview a document: default open a dialog with the preview
Parameters:
Name Type Description doc
object document data Properties
Name Type Description object
object object name field
object doc field name rowId
object row ID docId
object document ID name
object document name embedded
boolean embedded or dialog - Source:
- controller.js, line 5955
-
quit
-
Default quit is a session logout
Parameters:
Name Type Description params
object logout parameters Properties
Name Type Description url
string optional new location URL to change scope legacy
boolean true to return to legacy UI login
string optional user login to switch session token
string optional user token to switch session - Source:
- controller.js, line 796
-
randomString
-
Random string
Parameters:
Name Type Description len
Length - Source:
- controller.js, line 151
Returns:
Random string of specified length -
readCookie
-
Read a cookie
- Source:
- controller.js, line 831
-
readField
-
Read the form field into object field (async/file reading)
Parameters:
Name Type Description ctn
string | jquery Container to find field obj
Simplicite.Ajax.BusinessObject optional business object f
Simplicite.Ajax.ObjectField Business field index
string Optional index of field (list edit) cbk
function Callback when readed - Source:
- controller.js, line 7443
-
readFile
-
Read a form input file
Parameters:
Name Type Description file
object input file (jQuery or DOM object) cbk
function required callback output
string base64 (default) | ArrayBuffer | File - Source:
- controller.js, line 7505
-
readForm
-
Read all form fields into object fields (async/file reading)
Parameters:
Name Type Description ctn
string | jquery Container to find fields obj
Simplicite.Ajax.BusinessObject Business object index
string Optional index (list edit) cbk
function Callback - Source:
- controller.js, line 7486
-
ready
-
When page is loaded: load user rights, menu, texts and engine.
Then call the main page service.Parameters:
Name Type Description app
Simplicite.Ajax Ajax API to access to data engine
string extension name (default 'bootstrap') options
Simplicite.UI.Globals some globals options to override cbk
function Optional callback(err) when loaded - Source:
- controller.js, line 710
-
reloadForm
-
Reload the object form: default reload navigation
Parameters:
Name Type Description ctn
jquery Container obj
Simplicite.Ajax.BusinessObject Business object rowId
string object row ID - Source:
- controller.js, line 7772
-
removeLocalLogin
-
Remove a login from local storage
- Source:
- controller.js, line 878
-
resetDatamap
-
Reset datamap fields
Parameters:
Name Type Description ctn
string | jquery Parent container of referenced fields to set obj
Simplicite.Ajax.BusinessObject Object field
Simplicite.Ajax.ObjectField Mapped field index
string Optional row index (edit list) cbk
function optional callback to override fields change - Source:
- controller.js, line 5660
-
resize
-
Resize window handler
Parameters:
Name Type Description force
boolean true to force a full redraw - Source:
- controller.js, line 3049
-
saveForm
-
Save the object form
Parameters:
Name Type Description ctn
jquery Container obj
Simplicite.Ajax.BusinessObject Business object cbk
function Callback function(obj, errors, messages) params
object optional parameters (parent) - Source:
- controller.js, line 7556
-
saveList
-
Save the object list
Parameters:
Name Type Description ctn
jquery Container obj
Simplicite.Ajax.BusinessObject Business object params
object optional parameters (parent) cbk
function Callback(obj, errRow, msgRow) - Source:
- controller.js, line 7579
-
saveObject
-
Save the object after reading UI values
Parameters:
Name Type Description ctn
jquery Container obj
Simplicite.Ajax.BusinessObject Business object index
string Optional index/rowId in list params
object Optional parameters (parent) onSuccess
function Callback(msgs) on success onError
function Callback(errs) on error - Source:
- controller.js, line 7678
-
saveSession
-
Save the session (by default the recent activity in HISTORY)
Parameters:
Name Type Description cbk
function optional callback - Source:
- controller.js, line 900
-
selectDatamap
-
Object datamap picker: default open a popup to select data
Parameters:
Name Type Description ctn
string | jquery Parent container of referenced fields to set obj
Simplicite.Ajax.BusinessObject Object field
Simplicite.Ajax.ObjectField Mapped field index
string Optional row index (edit list) cbk
function optional callback to override fields change reset
boolean true to only reset all datamap fields - Source:
- controller.js, line 5544
-
selectMetaObject
-
Meta-object picker: default open a popup to select a reference
Parameters:
Name Type Description ctn
string | jquery Parent container of referenced fields to set obj
string | Simplicite.Ajax.BusinessObject Object field
string | Simplicite.Ajax.ObjectField Field of meta-object to select index
string Optional row index (edit list) - Source:
- controller.js, line 5495
-
selectObject
-
Object picker: default open a popup to select object(s) (used by pillbox, modeler and associate)
Parameters:
Name Type Description ctn
string | jquery Parent container obj
string | Simplicite.Ajax.BusinessObject object name or business object options
object list additive options { filters, parent, minified, layout... } and selectRows for multiple selections cbk
function callback(obj, id or array of ids) called on selection - Source:
- controller.js, line 4918
-
selectReference
-
Object reference picker: default open a popup to select a reference
Parameters:
Name Type Description ctn
string | jquery Parent container of referenced fields to set obj
Simplicite.Ajax.BusinessObject Object ref
string | Simplicite.Ajax.BusinessObject Referenced object name or business object (list popup) refField
string | Simplicite.Ajax.ObjectField Foreign key (or meta object) field to select (name or field) index
string Optional row index (edit list) cbk
function Optional callback (will replace all change events on each field) userKeys
boolean optional to get foreign user-key - Source:
- controller.js, line 5267
-
session
-
Open the user session with authtoken
Parameters:
Name Type Description cbk
function callback(err) when the session is opened or not params
object options Properties
Name Type Description scope
string optional user scope or home view - Source:
- controller.js, line 675
-
setAjax
-
Set the Ajax APIs
Parameters:
Name Type Description ajax
Simplicite.Ajax Simplicite.Ajax instance - Source:
- controller.js, line 51
-
setCompletionSize
-
Completion minimum size to trigger the search. 0 = disable
Parameters:
Name Type Description size
number positive number - Source:
- controller.js, line 6857
-
setEngineView
-
Set the view engine
Parameters:
Name Type Description name
string extension name (ex: bootstrap) cbk
function onload callback - Source:
- controller.js, line 658
-
setTheme
-
Change the current CSS theme (stored in local storage)
Parameters:
Name Type Description theme
string theme name (ex: 'default', 'light', 'dark') cbk
function optional callback - Source:
- controller.js, line 1158
-
splash
-
Loading page with status
- Source:
- controller.js, line 8541
-
title
-
Object title to display.
Parameters:
Name Type Description obj
Simplicite.Ajax.BusinessObject Object with metadata (label, plurallabel, userkey) userKey
boolean true to add the valued user-key plural
boolean true to use the plural label if exists - Source:
- controller.js, line 3336
-
toast
-
Toast dialog box
Parameters:
Name Type Description params
string | object message or object with: Properties
Name Type Description type
string optional 'error|danger|warning|info' content
string | jQuery toast body position
string top|bottom align
string left|right|center undo
boolean add a Undo button ? - Source:
- controller.js, line 1569
-
unbind
-
Unbind one UI action
Parameters:
Name Type Description name
string action name - Source:
- controller.js, line 2388
-
undoRedo
-
Undo/Redo service
Parameters:
Name Type Description ctn
string | jquery Target container action
string undo|redo num
string number of iterations (default 1) url
string optional URL to reload after server call (else use response url) - Source:
- controller.js, line 6020
-
warning
-
Warning dialog box
Parameters:
Name Type Description msg
string content - Source:
- controller.js, line 1721
-
yesNo
-
Yes/No dialog box
Parameters:
Name Type Description params
string | object message or object with: Properties
Name Type Description name
string optional name title
string optional title, default "CONFIRM" content
string | jQuery optional alert body help
string | jQuery optional help onYes
function optional callback on "YES" button onNo
function optional callback on "NO" button dontAskAgain
string use the 'dont't ask again' local storage (true=keep user's action or string=forced response), needs a name - Source:
- controller.js, line 1627
-
yesNoCancel
-
Yes/No/Cancel dialog box
Parameters:
Name Type Description params
string | object message or object with: Properties
Name Type Description name
string optional name title
string optional title, default "CONFIRM" content
string | jQuery optional alert body help
string | jQuery optional help onYes
function optional callback on "YES" button onNo
function optional callback on "NO" button onCancel
function optional callback on "CANCEL" button dontAskAgain
string use the 'dont't ask again' local storage (true=keep user's action or string=forced response), needs a name - Source:
- controller.js, line 1667
-
zipEditor
-
ZIP editor
Parameters:
Name Type Description ctn
object parent container doc
object { object, rowId, field, docId, name } params
object options { readonly:true|false } cbk
function optional callback to get the new ZIP as base64 - Source:
- controller.js, line 8093
-
<inner> keydown
-
Default keydown handler
CTRL-S : trigger "ui.key.ctrls" to all "js-ctrl-s" elements
ESCAPE : in order of priority close dialog, blur field (remove focus), or back in navigationParameters:
Name Type Description e
object Key event - Source:
- controller.js, line 1113
-
<inner> loadImport
-
load import view
- Source:
- controller.js, line 4619