The problem is worked around -- I got access to it via static Stapler.getCurrentRequest()
Tamás Mucs a következőt írta (2023. április 26., szerda, 14:39:44 UTC+2): > Hi All, > > According to the docs > <https://weekly.ci.jenkins.io/design-library/JavaScriptProxy/>: " After > defining the parameters from JavaScript, you can additionally define > parameters that are injectable by Stapler, such as StaplerRequest or > StaplerResponse." > > Yet I seem to get an error: "argument count mismatch between [] and > [interface org.kohsuke.stapler.StaplerRequest]" > > My java-side (In descriptor): > @JavaScriptMethod > public String someMethod(StaplerRequest req) { ... } > > Jelly: > <script> > descriptor. someMethod ((t) => { > console.log(t.responseObject()); > }) > </script> > Do I need to annotate or inject the StaplerRequest elsehow? Please let me > know if you know what I am missing. Any known plugins to inject > StaplerRequest into @JavaScriptMethod? > > Cheers, > Tamas > -- 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/db641e4f-e7e4-4f6f-8460-47ca770a3710n%40googlegroups.com.