Commit 939e672
Rename index.js adjunct to avoid view-name collision
The new external CSP-compliant script was named `index.js` and pulled in
with `<st:adjunct includes="...RestListParameterDefinition.index"/>`.
Stapler resolves that include against the same `RestListParameterDefinition`
class and treats `.index` as a view, recursively rendering `index.jelly`
with the Adjunct object as `it`. The build form ends up with two
`<select name="value">` (the second one with an empty `id="-select"`),
which the browser submits as two `value` fields and produces a 500 on
the server.
Renaming the file to `selectInit.js` and updating the adjunct include
removes the collision with the existing view name; only one parameter
widget is rendered and submit works again.
Verified on jenkins.sandbox.asatnet.net: single dropdown with the empty
"—" entry, empty value submits as an empty string, the build succeeds.1 parent 9805447 commit 939e672
2 files changed
Lines changed: 1 addition & 1 deletion
File tree
- src/main/resources/io/jenkins/plugins/restlistparam/RestListParameterDefinition
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments