I will try to explain:
I have the below build step code.
*public class MyPluginBuilder extends Builder {*
* private final List<MyFlow> myFlows;*
* ...............*
* @Override*
* public boolean perform(AbstractBuild<?, ?> build, Launcher launcher,
BuildListener listener)*
* {*
* for (MyFlow currentFlow : this.myFlows) {*
* }*
* return true;*
* }*
* @Override*
* public DescriptorImpl getDescriptor() {*
* return (DescriptorImpl) super.getDescriptor();*
* }*
* @Extension*
* public static final class DescriptorImpl extends
BuildStepDescriptor<Builder> {*
* private String localUrls;*
* public String getDisplayName() {*
* return "My Flows";*
* }*
* public ListBoxModel getLocalUrlsList(String value) {*
* ListBoxModel listModel = new ListBoxModel();*
* for (String currentUrl : localUrls.split("\n")) {*
* listModel.add(new Option(currentUrl, currentUrl,
currentUrl.equals(value)));*
* }*
* return listModel;*
* }*
* }*
* }*
And I have MyFlow class definition as below
*public abstract class MyFlow extends AbstractDescribableImpl<MyFlow>*
* {*
* public abstract static class MyFlowDescriptor extends Descriptor<MyFlow>*
* {*
* public MyFlowDescriptor() *
* {*
* load();*
* }*
* }*
* }*
In MyFlow config.jelly I need to have dropdown list with the values from
getLocalUrlsList method of MyPluginBuilder class.
* <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler"
xmlns:f="/lib/form">*
* <f:entry field="url" title="Urls">*
* <f:select />*
* </f:entry>*
* </j:jelly> *
So, I try to find the way how I can fill the dropdown list based on
getLocalUrlsList.
On Thursday, 2 June 2016 15:29:03 UTC+3, Baptiste Mathus wrote:
>
> I suspect what Robert is (also) asking was more actually a use case than
> /just/ a technical description on what you currently want to do.
>
> At least, I guess we'll need to know more precisely what you're trying to
> achieve from a high level PoV to be able to help you correctly.
> Possibly, you want to have a look at
> https://wiki.jenkins-ci.org/display/JENKINS/Dependencies+among+plugins as
> a starting point.
>
> Possibly, also, the right solution and the more common/standard might be
> to actually define an extension point in B so that A can register something
> against it. But again, it will depend on your use case.
>
> Cheers
>
> 2016-06-02 10:32 GMT+00:00 Shurik <[email protected] <javascript:>>:
>
>> In plugin "B" in global.jelly defined
>>
>> <f:entry title="local url" field="localUrl" >
>> <f:textbox />
>> </f:entry>
>>
>> My plugin is build step and I need ability in my plugin "A" somehow to
>> get the value of localUrl parameter.
>> I need it in DescriptorImpl inner class.
>>
>>
>>
>>
>> On Thursday, 2 June 2016 12:40:31 UTC+3, Robert Sandell wrote:
>>>
>>> What do you mean by parameter, and in what context do you want it?
>>>
>>> On Thu, Jun 2, 2016 at 10:59 AM, Shurik <[email protected]> wrote:
>>>
>>>> Hi,
>>>>
>>>> I have my plugin (A) that need to get global parameter that define by
>>>> other plugin (B).
>>>>
>>>> I need that "A" descriptor will be able to get parameter of "B"
>>>> descriptor ( via getter method )
>>>>
>>>> How I can do it ?
>>>>
>>>> Thanks,
>>>> Shurik
>>>>
>>>> --
>>>> 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/9fe48a9a-32ed-43cf-9320-4d882f03ca42%40googlegroups.com
>>>>
>>>> <https://groups.google.com/d/msgid/jenkinsci-dev/9fe48a9a-32ed-43cf-9320-4d882f03ca42%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> --
>>> Robert Sandell
>>> *Software Engineer*
>>> *CloudBees Inc.*
>>>
>> --
>> 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] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-dev/72dfa7f4-b901-49fe-83f8-5aa983394235%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/jenkinsci-dev/72dfa7f4-b901-49fe-83f8-5aa983394235%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
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/900df256-5a5c-446b-94c7-863b89430c0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.