I’m trying to use form validation on a dropdownDescriptorSelector, however here the validation method parameters (annotated with @QueryParameter) are not found and set to null (or 0). (If used standalone the validation works).
Is there anything different with a dropdownDescriptorSelector?
The relevant main jelly part:
<f:entry description="${description.tool}">
<f:dropdownDescriptorSelector field="tool" title="${%title.tool}"
descriptors="${descriptor.availableTools}"/>
</f:entry>
The relevant jelly part of the referenced Describable:
<f:entry title="${%High priority threshold}"
description="${%Minimum number of duplicated lines for high priority
warnings.}"
field="highThreshold">
<f:textbox default="50"/>
</f:entry>
My validation method:
public FormValidation doCheckHighThreshold(@QueryParameter final int
highThreshold,
@QueryParameter final int normalThreshold) {
return VALIDATION.validateHigh(highThreshold, normalThreshold);
}
Both parameters are always set to zero when setting a breakpoint here.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/C2537DD2-FB97-4B57-A972-14643BD727B1%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: Message signed with OpenPGP
