How to get or set a value from the graphics control
4WS.Platform provides a utility method to retrieve a reference to a detail form panel or a filter panel:
var filterPanel =getComponentByItemId('filterPanelXXX',win);var formPanel =getComponentByItemId('formPanelYYY,win);
4WS.Platform provides a utility method to retrieve a reference to a graphics control, starting from a form/filter panel reference:
var control =filterPanel.getForm().findField("attributeName")var control =formPanel.getForm().findField("attributeName")
where attributeName identify the input control and it is expressed in the "camel" format (see the detail form window to check out which is the name of an control).
Starting from that control, you can:
access to its value through the method getValue().
change its value through the method setValue(valueToSet).
Note: this instruction will work only if the specified input control has been declared visibile, otherwise the instruction will fire an exception, due to the command findField which will return null. By and large, it is always possible to use this instruction, which will work on the data model, rather than the current content of the input control: