2022 June Release

Control COOATTREDIT@1.1:CTRLStrList Permanent link for this heading

This control is used to enter a string value that may be chosen from a dropdown box. The value may be stored as string (which is the value chosen from the dropdown box) or as integer (which is the position of the string in the dropdown box).
You may also use this control when the user should be supported by an autocomplete list. In that case an edit field is displayed together with a list box. The user can choose a value from the list box or enter his own text. In the list box only values will be displayed that match the data entered by the user. An autocomplete list is only supported for string properties.
A Fabasoft app.ducx Expression defined in parameter Values will have to provide the strings for the dropdown box. This expression has the following input/output values:

Example (Values Expression):
instance Expression GetStreetList {
  exprtext = expression {
    string ::value; // the value the user has entered, autocomplete only
    object ::attribute; // the attribute definition this control is used for
    boolean ::isvalue; // false if the control is used in search mode

    // set to true means that this expression has provide all possible
    //   entries for ::value, the expression will not be called again
    // set to false means that the values cannot be returned as a complete
    //   list since there are too many entries available. In that case
    //   the expression is subsequently called when the user continuous typing.
    boolean ::iscomplete = true;
    string @pattern = (::value) ? ::value + "%" : "%";
    string[] @streets = cooobj.GetStreets();
    return @streets[this like @pattern];
  }
}
The expression has to return a string array. The input/output values have to be passed in the global scope of the expression. The local scope contains the current object. You may use the temporary scope to define local variables.
The autocomplete list will show a maximum of 500 entries, even if the expression will return more entries.

Example:
row {
  CTRLStrList street {
    colspan = 4;
    controloptions = expression {
      dictionary dict = {
        Autocomplete: true,
        WildcardSearch: true,
        Values: #GetStreetList
      };
      return dict;
    }
  }
}

COOATTREDIT@1.1:CTRLStrList(
  string Change,
  object Values,
  boolean Autocomplete,
  any Placeholder,
  boolean WildcardSearch)

Name

Description

Change

Defines the JavaScript function, which should be called when the value of the control has been changed.

Values

Defines the object address of a Fabasoft app.ducx Expression, which provides the values for the combo box.

Autocomplete

Defines whether the user can choose from a list box to complete the entered value. The Fabasoft app.ducx Expression has to provide the values a user can select from. A maximum of 500 entries will be displayed on the client.

Placeholder

or String object) Defines a string that is displayed as a placeholder in the background of the text field as long as there is no value in it. You can use an ordinary string of a String object if you want multilingual support. This option can only be used with the Autocomplete option.

WildcardSearch

By default the displayed values in the autocomplete list box must match from the first character on with the text entered by the user. Use this option to display values in the autocomplete list box that just contain the text entered by the user. This option can only be used with the Autocomplete option.

Additional Information