On Sun 29 Oct 2017 at 06:43, 'Marco Brondani' via Jenkins Developers <
jenkinsci-dev@googlegroups.com> wrote:

> Hello,
> I have a plug-in that uses Jenkins credentials to store API key and
> details necessary to make requests when the plug in runs.
> However, to improve the Builder interface, I'd like to use the credentials
> to make a request to the API and automatically populate the drop down in
> the builder itself.
> How can I do that?
>
> The credentials are not accessible in the jelly so I can't just set a js
> script to make the Ajax.
>
> Any help would be greatly helpful.
>

It’s a fairly standard pattern, you just have the doFill___Items method in
the DescriptorImpl reference the required fields with @QueryParam

Eg see doFillRepositoryItems in
https://github.com/jenkinsci/gitea-plugin/blob/master/src/main/java/org/jenkinsci/plugin/gitea/GiteaSCMSource.java


>
> Thank you,
> Marco
>
> --
> 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 jenkinsci-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/HE1P195MB018878B3F690F248A739D586F5580%40HE1P195MB0188.EURP195.PROD.OUTLOOK.COM
> <https://groups.google.com/d/msgid/jenkinsci-dev/HE1P195MB018878B3F690F248A739D586F5580%40HE1P195MB0188.EURP195.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Sent from my phone

-- 
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 jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CA%2BnPnMywMueDt_JJ9YBnobRG433MTmh5oKAmSi_oghVQ0RD_Fw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to