It allows a combo being filled with data fetched asynchronously (ajax) from a given URL when the page is loaded.
The URL data is fetched from must return a String representing a JSONObject. In order to do this, you can make use of Json-lib. That is, the server response should be something like:
{ p1: 'Name of the first product' p2: 'Name of the second product' p3: 'Name of the third product' }
where pX will be the value used for every Option HTML element created in the targetFieldName select and, its value, the text that will be displayed for such an option.
Attribute name | Description | Default | Required | Valid values |
url | URL the data to fill the second combo will be retrieved from. | true | ||
targetFormName | Name of the form the combo belongs to. | true | ||
targetFieldName | Name of the field in the combo, the one that will be filled with the data fetched from the given URL. | true | ||
nameValuePairs | a ',' separated object of pairs name:value. These parameters will be added, with the value given here, to the request. | true | a String representing a JavaScript-like object. i.e. {name1:'value1',name2:56} |
Note: all of the attributes accept runtime expressions.