Forms and filter
reloadFormPanel(panelid, args)
where XXX is the form identifier (CON12) - reload the form content
getFormPanelLabel(panelid, attr)
where XXX is the form identifier (CON12) and attr the name of the attribute which identifies a specific input field - returns the textof the input field label or button of the form panel
setFormPanelLabel(panelid, attr,value)
where XXX is the form identifier (CON12) and attr the name of the attribute which identifies a specific input field - set the specified textin the input field label or button of the form panel
getFormPanelValue(panelid, attr)
where XXX is the form identifier (CON12) and attr the name of the attribute which identifies a specific input field - returns the value currently set on the input field of the form panel
getFormPanelAddressValue(panelid, attr)
where panelid is the form identifier (CON12) and attr the name of the attribute which identifies a specific input field, the input type must be an address autocomplete fields. - returns the selected address components string in JSON format
setFormPanelValue(panelid, attr,value)
where XXX is the form identifier (CON12) and attr the name of the attribute which identifies a specific input field - set the specified value in the input field of the form panel
setVisibleComponent(panelid, attr, visible)
Set the visibility state for the input control belonging to the panel recognized by panelid, identified by the attribute name. The second argument can have the values "Y" or "N", used to set the visibility
insertFormPanel(panelid)
where XXX is the form identifier (CON12) - switch the form in insert mode
saveFormPanel(panelid)
where XXX is the form identifier (CON12) -save the content of a form panel (which can be in insert or edit mode)
clearSearchFilterPanel(panelid)
where XXX is the filter panel identifier (CON12) – clean the components of panel
applySearchFilterPanel(panelid)
where XXX is the filter panel identifier (CON12) – apply the filter conditions of panel to linked grid
setEnabledPanelButton(panelid, buttonId, enable)
Enable or disable the button in panel
Required arguments:
setFormPanelMaxLength(panelid, attr,value)
Set the max length for an input text.
Required arguments:
setFormPanelPlaceholder(panelid,attr,placeholder)
The placeholder attribute specifies a short hint that describes the expected value of an input field (e.g. a sample value or a short description of the expected format). The short hint is displayed in the input field before the user enters a value.
Required arguments:
setPanelOptionalParameter(panelid, parName, value)
Set the optional parameter for panel grid or detail
Required arguments:
getPanelOptionalParameter(panelid, parName)
Return the value of optional parameter of panel grid or detail ()
Required arguments:
setFocusByAttribute(panelid, attr, selectAll)
where XXX is the panel identifier (CON12) and attr the name of the attribute which identifies a specific input field – set the focus on the component
scrollPanelTo(panelid, x, y)
where XXX is the panel identifier (CON12), if the panel is scrollable scroll (ex. web preview o grid) the panel to the x and y position specified.
scrollPanelTo559(0, 0); //scroll panel to top
shrinkPanel(panelid)
Shrinks the panel vertically, removing any empty space after the last component.
Example:
resetFormPanelControls(panelId)
Reset all panel controls positions
setVisibleComponent(attr,visible)
Set the visibility state for the input control belonging to the current form panel, identified by the attribute name. The second argument can have the values "Y" or "N", used to set the visibility
setVisibleComponent(panelid, attr,visible)
Set the visibility state for the input control belonging to the current form panel, identified by the attribute name. The second argument can have the values "Y" or "N", used to set the visibility
forceValidation(attributeName)
After setting a value to a lookup control, force the validation, by specifying the attribute name identifying the right lookup control. Required parameters are:
setFormPanelControlBackgroundColor(attributeName, hexBackgroundColor)
Sets the background color of the component. Required parameters are:
before the 6.0.2 version this function name was: setBackgroundColorComponent
setFormPanelControlBackgroundColor(panelId, attributeName, hexBackgroundColor)
Sets the background color of the component in panel. Required parameters are:
before the 6.0.2 version this function name was: setBackgroundColorComponent
setFormPanelControlForegroundColor(attributeName, hexForegroundColor)
Sets the foreground color of the component in the current panel. Required parameters are:
before the 6.0.2 version this function name was: setForegroundColorComponent
setFormPanelControlForegroundColor(panelId, attributeName, hexForegroundColor)
Sets the foreground color of the component in panel. Required parameters are:
before the 6.0.2 version this function name was: setForegroundColorComponent
pull()
Get data from each input control and refresh the value object behind the form/editable panel.
checkMandatoryControls()
Check the current panel (form or editable panel) for mandatory input controls not filled: when finding one, shows a message dialog with the control name violating the mandatory property. The method returns "true" (no mandatory controls found) or "false" (a string), according to the outcome.
setEnabledComponent(attr, enable)
Set the enable state for the input control belonging to the current form panel, identified by the attribute name. The second argument can have the values "Y" or "N", used to set the enable
setEnabledComponent(panelId, attr, enable)
Set the enable state for the input control belonging to the panel, identified by the attribute name. The third argument can have the values "Y" or "N", used to set the enable
getMode()
Returns the mode (READONLY, INSERT or EDIT) of current panel
setFormPanelCurrency(panelId, attrName, currency)
where panelId is the panel identifier (CON12) and attrName the name of the attribute which identifies a specific input field – set the specified currency in the input field of the panel
setFormPanelStyle(panelId, attrName, style)
Since 6.0.2 version
where panelId is the panel identifier (CON12) and attrName the name of the attribute which identifies a specific input field - set the specified style to the field of the panel.
The available attributes for the style object are:
mobileControlBorderColor
mobileControlBorder
mobileBackgroundColor
mobileForeColor
mobileFontName
mobileFontStyle
mobileFontSize
showCounterChars
disableSelfCorrection
textStrikethrough
getFormPanelVo(panelId)
Since 6.0.2
Returns the passed panel vo.
addFormPanelControl(panelId,controlArgs,constraints,style)
Since 6.0.2
Add a control to visible panel, the panel must have a CONSTRAINT layout, absolute layout is not supported.
controlArgs is a JSON and support this properties:
type
attributeName
label
value [OPTIONAL]
eventClick [OPTIONAL]: the actionId of the action to call on click event
eventChangeValue [OPTIONAL]: the actionId of the action to call on change event
eventLostFocus [OPTIONAL]: the actionId of the action to call on lost focus event
Supported controls are:
"TEXT_FIELD";
"BUTTON_FIELD";
"LABEL_FIELD";
"LINE_FIELD";
"TEXTAREA_FIELD";
"IMAGE_URL_FIELD";
"IMAGE_PATH_FIELD";
constraints is a JSON, see Constraints for the list of available properties
style is a JSON, see setFormPanelStyle method for the list of available properties
setFormPanelDatePickerStyle(panelId, attributeName, style)
Since 6.0.2
Set the style of a date picker controls.
Style accept the following properties:
showNowButton: only works on iOs Picker
title: only works on iOs Picker
setFormPanelAnimation(panelId,attrName,options)
Since 6.0.2
Set the animation for an animation control
Available options are (all options are optional):
json: animation json (as an alternative to url or path)
url: animation url (as an alternative to json or path)
path: animation local path (as an alternative to json or url)
cacheKey: optional, cache animation cache key
minFrame: [integer] the minimum frame that the animation will start from when playing or looping
maxFrame: [integer] the maximum frame that the animation will end at when playing or looping.
minFrameMarker: [string] the minimum frame to the start time of the specified marker
maxFrameMarker: [string] maximum frame to the start time + duration of the specified marker
minProgress: [float] the maximum progress that the animation will end at when playing or looping
maxProgress: [float] the minimum progress that the animation will end at when playing or looping
repeatCount: [integer] how many times the animation should be repeated. If the repeat count is 0, the animation is never repeated. If the repeat count is greater than 0 or INFINITE (-1), the repeat mode will be taken into account. The repeat count is 0 by default.
repeatMode: [integer] This setting is applied only when the repeat count is either greater than 0 or INFINITE. Available value are 1 (RESTART) or 2 (REVERSE)
API AVAILABLE ONLY ON FILTER PANEL:
removeFilter(fieldName)
Remove a filtering condition fromthe filter panel search. Typically, this instruction is added to a js action linked to the "before search" event of the Search button in a filter panel. Required parameters:
getFilterPanelValue(panelid, attr)
where panelId is the filter identifier (CON12) and attr the name of the attribute which identifies a specific input field – returns the value currently set on the input field of the filter panel
setFilterPanelValue(panelid, attr,value)
where panelId is the filter identifier (CON12) and attr the name of the attribute which identifies a specific input field – set the specified value in the input field of the filter panel
Last updated