Implementing guiInit
The guiInit
function is called during initialization of the application and provides the form definition.
In this section the calling syntax, arguments and return values will be discussed, followed by a small example.
Syntax
function payload = guiInit(metaData)
...
end
def gui_init(meta_data: dict) -> dict:
...
return payload
Arguments
metaData
:
Meta data describing the client session.
Struct/dict with fields:
session_id
: unique ID for the session, can be used to differentiate between multiple instances of the applicationnamespace
: package name of the application
In the guiInit
function, form is defined by filling the form
field of the payload
.
The payload is then sent to the front-end in order to present the form to the user.
payload
:
Return value with the form definition.
Struct/dict with fields:
form
: asimian.gui.Form
navbar
(optional): struct/dict with fields:logo
(optional): image source reference (anything that can be put in HTML<img src="..." />
title
(optional): HTML stringsubtitle
(optional): HTML string
See also
- For an example see Hello world!.