Setting DSP Widget Properties

  • To set the default properties of logical DSP widgets, edit the widget mappings in the [webwidgets] section of usys.ini.
  • To set properties declaratively in the Uniface IDE, click the More icon (More icon) for the property DSP Widget Type Properties. This is a dialog in which you can set the various Uniface, HTML, and CSS properties supported by the widget.

    DSP  Widget Properties dialog

  • To set values of the widget properties in ProcScript, use the following commands:
    • For fields: $properties and $fieldproperties
    • For entities: $entityproperties and $curentproperties
    • For occurrences: $occproperties

    For example, to set some HTML properties:

    putitem/id $properties(MY_FIELD), "html:title" "Hello"
    putitem/id $properties(MY_FIELD), "html:data-myselector", "Hello"
  • Once the DSP is loaded, the values of these properties can be dynamically changed in the browser using JavaScript API functions, such as setProperty and getProperty. For more information, see APIs: JavaScript.

    Tip: In Dynamic Server Pages it is usually preferable to change the values of widget properties using JavaScript rather than ProcScript.