Cascading Dropdown
Syntax
Arguments
targetId
String
Dropdown that will be populated based on selection of other dropdown list of values from server specified in “url”.
url
String
URI of the action that List is derived from
Description
Populates a Dropdown List whose content/items depends on the selection of a previously selected Dropdown element by sending an HTTPGET request to the action of the URI specified in “url” and loading the data from the Server into the Dropdown List specified in “targetId”.
To be able to use this feature, the Model of the webpage needs to contain a function along the lines of:
This function needs to be called by the respective Action in the Controller, for example like this:
Example
The following program illustrates the function call:
When the selection of the first Dropdown List changes, function will change the content of the second Dropdown List by sending a request to the action of the URI “main/dropdown” along with the new selection of first Dropdown List as parameter.
Last updated