There are a couple of ways to create a dropdown in Jenkins.
You can use dropdownDescriptorSelector
to create a fully data-bound form and the option to include a config page for the descriptor
by creating a file called config.jelly
.
If you want a simpler select
to be rendered you can use the f:select
Jelly tag and create a doFillFieldNameItems
method in the descriptor
.
Fruits
Dynamic select
Updates the contents of a "select" control dynamically based on selections of other controls.
config.jelly:
Sample.java: