onWebAppSettings - Execution Hook
onWebAppSettings
is called to create the content for Application Script settings in the SETUP menu.
onConfigChanged(outp, channel)
Parameter | Type | Description |
---|---|---|
outp |
object | used to create web settings. |
If this function is not defined, then the "Application Settings" choice will not appear on the SETUP menu.
function onWebAppSettings(o)
o:heading('Test '..ch)
o:text('Test1', 'c.lua.test1', 63, 'Test hint')
o:heading('More details')
o:text('Test2', 'c.lua.test2', 63, 'Some more hints')
o:choice('Decide', 'c.lua.choice', {'1=Something', '2=Another', '3=More'}, 'Choose from the list')
o:info('Company', 'Please check this out, as this can include all kinds of other information that gets output to the hint line')
o:info('', 'and some more hints and details can be emitted here.')
end
outp:write('HTML')
- write pure HTML.
outp:heading('TEXT')
- create a heading
outp:text('LABEL', 'LUA_VAR', WIDTH, 'HINT')
- create a text box.
outp:choice('LABEL', 'LUA_VAR', {CHOICE1, CHOICE2, ...}, 'HINT')
- create combo choice.
Each choice should be in the form VALUE=TEXT
, so that LUA_VAR = VALUE
when saved.
outp:info('LABEL', 'HINT')
- create a hint text area.
outp:reboot()'
- request reboot when the page has been saved.
i.e. ask whether to reboot Lua now or later.