Render functions

A renderFunction runs in the browser, not in 4D. In an event, set vt_ClassName to the literal string renderFunction and vt_FunctionName to one of the names below; the parameters go in vo_Param.

{ "vt_ClassName": "renderFunction", "vt_FunctionName": "showBloc",
  "vo_Param": { "vt_BlocName": "<uuid of the block>" } }

There are 51 of them.

Reading the tables

  • block: a block of the page, picked with the panel's block selector (getBlocsNameCollection). When only some types are accepted, they are shown in square brackets.
  • list: a value picked from a list supplied by the method named.
  • filter: a parameter of type objectFilter.
  • required: the parameter must be filled in.

Show and hide

FunctionParameters
showBlocvt_BlocName (block, required)
hideBlocvt_BlocName (block, required)
toggleDisplayvt_BlocName (block [wrapper, accordion], required)
vb_ToggleDisplay (boolean)
showOnlyOneBlockInWrappervt_WrapperName (block, required)
vt_BlockName (block, required)
hideBlockAccordingFieldValuevt_BlockName (block)
vt_Comparison (list, BSPK_GET_LIST_COMPARISON_WF)
vt_Values (text)
removeBlockvt_getBlocToRemove (block)
unloadBlockvt_BlockName (block, required)
openAccordionvt_BlockName (block [accordion], required)
closeAccordionvt_BlockName (block [accordion], required)
showModalvt_BlockName (block [modal], required)
closeModalvt_BlockName (block [modal], required)

Enable and disable

FunctionParameters
enableBlockvt_BlockName (block, required)
disableBlockvt_BlockName (block, required)
disableIfEmptyfilter
vt_BlockName (block [fieldText, fieldSelect, button])
actionAccordingNumberLinefilter
vt_BlockName (block, required)
vt_Action (list, BSPK_GET_LIST_RENDER_ACTION_WF, required)
actionBlockvt_BlockName (block, required)
vt_Selector (text)
vt_ActionName (text)
removeRequiredIfNotEmptyselector (text)

Listbox

FunctionParameters
reloadListboxvt_BlocName (block, required)
listboxSearchvt_BlockName (block [wrapper, accordion], required)
unselectInListboxvt_BlocName (block [listbox], required)
removeFiltersvt_BlocName (block [wrapper, accordion], required)
setInputWithSelectedRowfilter
vt_BlockName (block, required)
functionName
copyColumnfilter
vt_ColumnNameToCopy (text)
labelAccordingNumberLinefilter
vt_BlockName (block, required)
vt_LabelKey (text, required)
vt_LabelSelector (text)

Inline editing popups

FunctionParameters
popupInputText, popupInputNumeric, popupInputDate, popupInputTime, popupInputMail, popupInputTel, popupInputPassword, popupInputTextareafilter
className (text)
functionName (text)
vt_getBlocInfo (block)
vb_Required (boolean)
vb_MultiLang (boolean)
vt_DefaultValue (text)
popupSelectvt_Message (text)
filter
vb_LoadInRender (boolean)
vt_ValuesClass (text)
vt_ValuesFunction (text)
className (text)
functionName (text)
vb_Required (boolean)
vb_TomSelect (boolean)
vb_Combobox (boolean)
vb_Multiple (boolean)
popupMenuvt_Message (text)
filter
vb_LoadInRender (boolean)
vt_ValuesClass (text)
vt_ValuesFunction (text)
className (text)
functionName (text)
vt_getBlocInfo (block)

Values and fields

FunctionParameters
setValuevt_BlockName (block, required)
emptyValueFieldvt_BlockName (block [fieldText, fieldSelect])
toggleBoolean(none)
loadAttributevt_BlockName (block, required)
vt_Selector (text)
vt_AttributeName (text)
vt_Value (text)
updateSlidervt_BlockName (block)
showPickervt_BlockName (block, required)
triggerClickvt_BlockName (block, required)

Styling

FunctionParameters
addCssClassesvt_BlockName (block)
vt_ClassesToAdd
removeCssClassesvt_BlockName (block)
vt_ClassesToRemove (text)

Messages

FunctionParameters
alertMessagevt_Message (text)
confirmMessagevt_Message (text)
vb_Bypass (boolean)
className (text)
functionName (text)
openAlertvt_AlertType (list)
vt_AlertTitle (text)
vt_AlertMessage (text)

Navigation

FunctionParameters
linkvt_MenuUuid (URL)
vb_TargetBlank (boolean)
goPreviousPage(none)
removeUrlParameters(none)

Device

FunctionParameters
activateQrScannervt_BlocName (block [qrCodeScanner], required)

Other

FunctionParameters
otherRenderFunctionsvt_RenderFunction (text)

Pitfalls

Fill block parameters with the panel's block picker. It writes the expected value; a value typed by hand, through the API or in a file, is the first thing to suspect when showBloc or hideBloc seems to do nothing.

reloadListbox is client-side. The server-side equivalent, called from a 4D function through the WebFormController, is displayListbox. Calling one where the other is expected does nothing at all.

Popup callbacks use className / functionName in vo_Param — without the vt_ prefix, unlike everything else. And the callback must return vo_Line for the cell to refresh without reloading the whole listbox.