Help with Jelly for Global Config

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with Jelly for Global Config

Miguel Campos

Hello guys I need some help with a form for the global config.

I'm trying to modify the default config sample plugin and mixing it with the samples of the UI-sample plugin.

so finaly I can create my own configuration for my plugin.
but I'm really strugling.

This is the Jelly file.

-----------
file name: config.jelly
in package: io.jenkins.plugins.sample.SampleConfiguration
---------------
<?xml version="1.0" encoding="UTF-8"?>
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:s="/lib/samples">
    <f:section title="${%01Test Form}">
        <f:entry field="label" title="${%Label}">
            <f:textbox/>
        </f:entry>
        <j:set var="currentFruit" value="${it.fruit}" defaultValue="noneRamone"/>
        <f:block>Esta es mi current Fruit "${currentFruit.displayName}"</f:block>
        <f:dropdownList name="fruit" title="Fruits">
          <j:forEach var="descriptor" items="${it.fruitDescriptors()}" varStatus="loop">
            <j:set var="fruit" value="${descriptor==currentFruit.descriptor?currentFruit:null}"/>
            <f:dropdownListBlock title="${descriptor.displayName}" value="${loop.index}"
                                 selected="${fruit!=null}" staplerClass="${descriptor.clazz.name}">
              <st:include page="${descriptor.configPage}" class="${descriptor.clazz}"/>
            </f:dropdownListBlock>
          </j:forEach>
        </f:dropdownList>

    </f:section>
</j:jelly>
-----------------


The thing is for the textbox label it get the information from the Java class right.
but for the j:set current Fruit  I gues it should execute the method get Fruit() from the same class but it does not.
I have traces and the method is never executed.

I'm lost no idea what I'm doing wrong
I guess the same is happening for the j:forEach to fullfill all the options inthe dropdown list.

any ideas?

I must admit I have verry little jelly knowledge and I'm also struging to find documentation that helps with this.

Thanks for your help.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/4766705e-6cce-4e56-b04d-6a3997e21f07n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help with Jelly for Global Config

Ulli Hafner
How should your configuration look like? What values should be changed by the user?

Am 30.09.2020 um 15:52 schrieb Miguel Campos <[hidden email]>:


Hello guys I need some help with a form for the global config.

I'm trying to modify the default config sample plugin and mixing it with the samples of the UI-sample plugin.

so finaly I can create my own configuration for my plugin.
but I'm really strugling.

This is the Jelly file.

-----------
file name: config.jelly
in package: io.jenkins.plugins.sample.SampleConfiguration
---------------
<?xml version="1.0" encoding="UTF-8"?>
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:s="/lib/samples">
    <f:section title="${%01Test Form}">
        <f:entry field="label" title="${%Label}">
            <f:textbox/>
        </f:entry>
        <j:set var="currentFruit" value="${it.fruit}" defaultValue="noneRamone"/>
        <f:block>Esta es mi current Fruit "${currentFruit.displayName}"</f:block>
        <f:dropdownList name="fruit" title="Fruits">
          <j:forEach var="descriptor" items="${it.fruitDescriptors()}" varStatus="loop">
            <j:set var="fruit" value="${descriptor==currentFruit.descriptor?currentFruit:null}"/>
            <f:dropdownListBlock title="${descriptor.displayName}" value="${loop.index}"
                                 selected="${fruit!=null}" staplerClass="${descriptor.clazz.name}">
              <st:include page="${descriptor.configPage}" class="${descriptor.clazz}"/>
            </f:dropdownListBlock>
          </j:forEach>
        </f:dropdownList>

    </f:section>
</j:jelly>
-----------------


The thing is for the textbox label it get the information from the Java class right.
but for the j:set current Fruit  I gues it should execute the method get Fruit() from the same class but it does not.
I have traces and the method is never executed.

I'm lost no idea what I'm doing wrong
I guess the same is happening for the j:forEach to fullfill all the options inthe dropdown list.

any ideas?

I must admit I have verry little jelly knowledge and I'm also struging to find documentation that helps with this.

Thanks for your help.


--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/4766705e-6cce-4e56-b04d-6a3997e21f07n%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/6FB21D6A-CEE8-4BD0-8833-89F489F11412%40gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help with Jelly for Global Config

Miguel Campos
Hi I'm trying to replecate (at the moment) the sample of the Dropdown List Sample that the UI samples plugin have.
but instead in a separated page. in the global configuration.
https://plugins.jenkins.io/ui-samples-plugin/

So at the moment the form shoul look like
in the section for my plugin.
1 text box for property Label. (this is working fine)
2 then I want to have a dropdownList   that select the two fruit clases I have apple and Banana (same as in the ussample)
and based on that show a different form .

but as I said my drop list is emplty and the methods inside the java class for Sampleconfiguration are not beeing called.
they are called only for the first text box.
 but all the rest of the jelly code is like it was not there. I see an empty droplist.
I'm lost I do not know if the "it" object is not working or what is happening.

Sorry for the bad explanation.I know it is verry difficult to help mi with this little info. sorry.

should be something like this but in the global config section and with a text field on top called label.

The Seeds form is dynamic and changes based on the content of the droplist.

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABdYAAADkCAYAAACVBnbKAAAABHNCSVQICAgIfAhkiAAAIABJREFUeF7t3XuYllW9N/DfcDZJQTlJHBRFM5QEIfNUnsPXrWRYmmZmKWGXe6u9YqBtO6GpmIllqWzzlG59LzEVlSJM7aCJgSlqCrpDBQRBRSBBQOadtdozcZhRgXvGZ57ns65rLp65D+te67Oev76z+N1V1TUttCYR6PhvFzTJc8r5IW/cc15M+N1Tcf61v43x3zo6enXrGFOmzopz/2tK/P4np8ROPTtFck7Xpfb0/8yP/3vFvXHgnjvGt048IJ/b2Jb6euTJF+PxmXPj0tv+FH+97t9jq/btcl/nfH7vGH3SQRvbpesJECBAgAAB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aNHj3ru+OAOTZkyJUaNGhVbb7113H///R/cQDyZAAECBAgQIECAAAECBAgQIECAAAECBN6XQNkF63fddVf84Ac/WGfyCxcujPvuuy8efvjh+OUvfxndunV7XzguIkCAAAECBAgQIECAAAECBAgQIECAAAEC6wuUXSmY6667Ls/x0EMPjTvvvDMeeOCBuPTSS6Ndu3axePHiHKxrBAgQIECAAAECBAgQIECAAAECBAgQIEBgUwXKbsf666+/ni369+9fV/blgAMOiNNPPz2XhuncuXOdVQrar7jiiryTPX1u3759DBgwIM4666zo3r17vm7QoEH535/85Cfxi1/8Ip5++uno0KFDnHzyyfkZP/rRj2LGjBmx7bbbxle/+tX43Oc+l69Pof6YMWNiv/32i09+8pNxyy23RNo5369fvxg5cmTssssu+br62po1a+L666+PX/3qV/mej3zkI/GFL3whjj322Poud4wAAQIECBAgQIAAAQIECBAgQIAAAQIEmlCgqrqmNeHzGv1RqV55qlueWgrFU7C91157Rd++fTd49je+8Y2YOnVqtGnTJnr16hUvvfRSrFy5MnbbbbccbNf2kf5t3bp17LvvvrFo0aJ46qmn8rm2bdvG7rvvHlVVVfHYY4/lYzfffHMOzWuD9bRTfvXq1XkMs2fPjrlz5+YAPwXtKbyvr8b6RRddFLfffnu0aNEij2vOnDm5jxEjRsQpp5ySn6MRIECAAAECBAgQIECAAAECBAgQIECAwAcjUHalYFKw/vGPfzxr/uUvf4nLL788vvjFL8aRRx4Zt912W9T+HWH58uXRpUuXvIM81WVPLzv98Y9/nO9LwXnaNb52O+aYY3JJmauvvjqXlUlt4MCBcdVVV8XPfvazup3wjz/++Dr3pZenXnLJJTFu3Lj8/N69e8eyZcsaLEmTQvQUqqd22WWX5c+p/9TSjvl0r0aAAAECBAgQIECAAAECBAgQIECAAAECH5xA2QXrqUzLtddeGz//+c/juOOOiz59+mTdV155JcaOHZuD8dS22GKL+O53vxs33HBDpJD9nnvuiTvuuKNuJd566611VqW2JEzapZ6ekVoq8ZJa2rHetWvX/Hn9+9K1n/rUp/K5FMin2u+p/fWvf83/rt/SHwNS22qrrfIu+wULFuRSMGl3e9pN39B96/fjdwIECBAgQIAAAQIECBAgQIAAAQIECBBoHIGyqrGeyqWkUi2pXvrgwYPzT2opnL7wwgvjT3/6U94pfuqpp0bLli1zmJ52nM+fPz9fVxuYp8+pDMvabcstt6z7tVWrf7Klki61LfWX2vo73de+Jp3feuut83VLly7N/67f3nzzzXxoyZIlccQRR6x/Os9FI0CAAAECBAgQIECAAAECBAgQIECAAIEPTqCsgvXp06dHqpue2oQJE3LZldTSbvKjjjoqB+upNEsKtVOYnnasp93m6cWmBx98cA7Fhw0blu9ZP1jPB9dr7+eaV199NT+ztnxMbTBeG7Cv32enTp3yoY4dO8b555+//unYcccdNzjmAAECBAgQIECAAAECBAgQIECAAAECBAg0nUBZlYLZY4898otBUzv33HNj2rRpkYLtVF7lmmuuycc7d+6cd6bPnDmz7vevfOUr0bNnz3j++ecLl0/lW8aPH5/7TWH+pEmT8udUn72+lurDp8D+jTfeyHPZf//9Y4cddsg12idOnJh32msECBAgQIAAAQIECBAgQIAAAQIECBAg8MEJlNWO9TZt2sR5550Xo0ePjueeey6+/vWvbyB7xhln5GPppaUpwE7Be9oZngL32peGpvOpFEvtLvMNOtmIA2lMN954Y67fnuqvv/POO7l++gknnFBvLz169Mi76++888447bTTcp31l19+Ob+0NO1mr63lXu/NDhIgQIAAAQIECBAgQIAAAQIECBAgQIBAowuU1Y71pJVeDnr55ZfHJz7xibzjO+3wTjvU991337jyyitjyJAhGTWVVPn+978fvXr1iilTpsSDDz4YI0aMqHvZ6dSpUwvB79KlS1xyySW5tnoK8gcMGJB3z79bQD5q1Kj8R4Fu3brFrFmz8otW04tYL7vsskLGpBMCBAgQIECAAAECBAgQIECAAAECBAgQ2HSBquqatum3u7MhgbTjfMyYMZF2oKfPGgECBAgQIECAAAECBAgQIECAAAECBAiUh0DZ7Vgvj2UxCwIECBAgQIAAAQIECBAgQIAAAQIECBAoVQHBeqmujHERIECAAAECBAgQIECAAAECBAgQIECAQEkKKAVTkstiUAQIECBAgAABAgQIECBAgAABAgQIECBQqgJ2rJfqyhgXAQIECBAgQIAAAQIECBAgQIAAAQIECJSkgGC9JJfFoAgQIECAAAECBAgQIECAAAECBAgQIECgVAUE66W6MsZFgAABAgQIECBAgAABAgQIECBAgAABAiUpIFgvyWUxKAIECBAgQIAAAQIECBAgQIAAAQIECBAoVQHBeqmujHERIECAAAECBAgQIECAAAECBAgQIECAQEkKCNZLclkMigABAgQIECBAgAABAgQIECBAgAABAgRKVUCwXqorY1wECBAgQIAAAQIECBAgQIAAAQIECBAgUJICgvWSXBaDIkCAAAECBAgQIECAAAECBAgQIECAAIFSFRCsl+rKGBcBAgQIECBAgAABAgQIECBAgAABAgQIlKSAYL0kl8WgCBAgQIAAAQIECBAgQIAAAQIECBAgQKBUBQTrpboyxkWAAAECBAgQIECAAAECBAgQIECAAAECJSkgWC/JZTEoAgQIECBAgAABAgQIECBAgAABAgQIEChVAcF6qa6McREgQIAAAQIECBAgQIAAAQIECBAgQIBASQoI1ktyWQyKAAECBAgQIECAAAECBAgQIECAAAECBEpVQLBeqitjXAQIECBAgAABAgQIECBAgAABAgQIECBQkgKC9ZJcFoMiQIAAAQIECBAgQIAAAQIECBAgQIAAgVIVEKyX6soYFwECBAgQIECAAAECBAgQIECAAAECBAiUpIBgvSSXxaAIECBAgAABAgQIECBAgAABAgQIECBAoFQFBOulujLGRYAAAQIECBAgQIAAAQIECBAgQIAAAQIlKdCqJEdlULFgwYJ49dVXY+XKlTQIECBAgAABAgQIECBAgAABAgQIECBAYDME2rRpE126dImuXbtuRi//ulWwXghjsZ3Uhupr1qyJFi38p4JidfVGgAABAgQIECBAgAABAgQIECBAgEClCaSsNW1kTq2IcF2wXoLfoLTAVVVVscUWW+RgPX3WCBAgQIAAAQIECBAgQIAAAQIECBAgQGDjBaqrqyMF66k6SNrULFjfeMN17hg2bFi8+OKLG/SyzTbbxOTJkzc4/l4Hli5dGgceeGDcfvvtsf3228esWbPirbfeio9//OPvdes659MCt2/fPlq18nePjYJzMQECBAgQIECAAAECBAgQIECAAAECBNYTSBuX0wbmFLAvW7asEJ+KT26HDh0ahx122DqYqd7OprR031e/+tXo0KFDvn306NFx0kknbXSwnu5t2bLlpgzBPQQIECBAgAABAgQIECBAgAABAgQIECBQj0CRmWvFB+s9e/aMvfbaqx7mjT/Utm3b+MY3vlF3Y/oLyKY25V82Vc59BAgQIECAAAECBAgQIECAAAECBAgQ2FCgyMzVmzE39K07cuGFF8aYMWPixBNPjEMOOSRmzpwZn/3sZ2PixIl11zzzzDMxaNCgePvttyOVgkmfZ8+eHcOHD89lZr73ve/FD37wg3x9KhFz5JFHxt577x1f/OIX45FHHnmXpztFgAABAgQIECBAgAABAgQIECBAgAABAqUoUPE71letWpXroK/d2rVrl2vupHb33XfHN7/5zVzQvk+fPu97Da+88so49thjcyifwvTnn38+Lr/88hg7dmz07t077rzzzvjWt74Vv/nNb/JLSjUCBAgQIECAAAECBAgQIECAAAECBAgQaB4CFR+sX3311ZF+1m633npr7LTTTvlQCtOPO+64jV7N1q1bR/qvBekFpOln7ty5uW76dtttF927d49TTz01Bg4cqJb6Rsu6gQABAgQIECBAgAABAgQIECBAgAABAh+sQMUH68OGDYvDDz98nVXo0aNH3e9rf96cpUp13D/60Y/GMcccE7vsskvsv//+uazMpr4odXPG4l4CBAgQIECAAAECBAgQIECAAAECBAgQ2HSBiq+xnnaQ77HHHuv8pFIwtW3tz/Uxv/POO/Ud3uBY6ueqq67Ku+P33HPPuO++++L444/PddiLaqn2+4477hjXX399UV3mfl555ZXc75w5cwrtV2cECBAgQIAAAQIECBAgQIAAAQIECBBojgIVH6xv7KKlEi/Lli2ru+2ll15qsIu13zI7ffr0uPnmm3Oonmq233HHHbm2+qOPPtrg/Rt7IgXrqX77hAkTNvZW1xMgQIAAAQIECBAgQIAAAQIECBAgQIDA+xQQrL9PqNrL+vXrl0PxGTNmxMMPPxzXXXddgz2kXerTpk3LLy5NL0P96U9/mneqL1iwIH7/+9/Ha6+9lsvDFNHefPPN+MMf/hBnnHFGPPPMM/Hss88W0a0+CBAgQIAAAQIECBAgQIAAAQIECBAgQGA9AcH6Rn4lRowYEZ06dYrhw4fHuHHj4swzz2ywh1RP/f7774/x48fnUjMjR46Ma665JoYOHRpXXHFFjB49Ovr379/g/RtzYtKkSble+xFHHBE77LDDBrvWhwwZEhdffHF+9n777Rdf+tKXona3/euvv55LvaSxpev23nvvGDVqVKxYsaLeIaQ/DJx22mmx22675b4uuuiiePvtt+u91kECBAgQIECAAAECBAgQIECAAAECBAg0lkDKaJcsWbJB9+lYymAbq1VV17TG6ly/myaQdrl36NAh1i4l8149nXDCCbHtttvmL0sKutOu+rSjvlWrf76fNgXmCxcujP/+7/+OnXfeOcaOHRuTJ0+OFMinL9ngwYNzyH/DDTdEKndzyimnRM+ePXNfqcZ6CtAfeuihSC9zTS987datW94dn8rifOc738n3n3/++e81TOcJECBAgAABAgQIECBAgAABAgQIECBQiEAK1VMe+rGPfSyX4d5qq61yvynvTHlpquzxH//xHznHTC1F4YsXL87luje32bG+uYIlcH/aQT516tQ49NBD82g+85nP5DIzKQhfu6UvUwrVU0tfqHTf2jXezz777PzlS7XfUx34u+66K9566611+kjXpzIzP/rRj3JfAwcOjO9973txyy23xMqVK9e51i8ECBAgQIAAAQIECBAgQIAAAQIECBBoLIGTTz45dt111xygp+wzBeprh+rpXLqmMdo/tzM3Rs/6bDKBe+65J1q2bBkHHHBAfmYqO9O1a9dcDubggw+uG8fa9dzbtm2bd5+n+u/pC5ba2udTaZgUlL/88st1f+lJ17zwwgu57EvaoV7b0l96Vq1aFXPmzIk+ffrUHfeBAAECBAgQIECAAAECBAgQIECAAAECjSWQNgmnDb/HH398XbienpWC9pR5pnO1u9iLHoNgvWjRD6C/iRMn5mB77f/CsGbNmnjggQfijTfeiI4dO+ZRrV/1J9VQT4F8fa22vnp66erabfXq1dG9e/e48cYbN7htu+222+CYAwQIECBAgAABAgQIECBAgAABAgQIEGgsgfXD9fScxg7V0zOUgmmsFW2ifmfPnh0zZsyIb3/725F2rtf+XH311XnHeQrda9tTTz1V9znVW583b17dbvV0IvVT25544onYcssto1evXuvMJO1Inz9/fqQd79tvv33+Wbp0aVx22WUbBPfr3OgXAgQIECBAgAABAgQIECBAgAABAgQINIJAbbieAvWmCNXTFOxYb4SFbMouU3CevjjpvzuksLu2pfrnqSRMKgfz5S9/OR9O//UhHdtpp53iggsuyKVfBgwYkAv2p/bDH/4wttlmm7z7Pb209Ljjjlunz3TNPvvsk2urn3XWWfmlpWln/KhRo/KLTtu1a5f70QgQIECAAAECBAgQIECAAAECBAgQINCUArXhenpmY5V/WXs+dqw35eo2wrNSsH7UUUdtEICnR33pS1+KtEt95syZ+clHH310XH755TF06NBo3bp1jB8/PtYu9XLEEUfEqaeemn/Si1BHjhy5wYjT9Wk3fPpyfuELX4iTTjop+vXrF2PHjt3gWgcIECBAgAABAgQIECBAgAABAgQIECDQVAIps2yKUD3Np6qm7nZ1U03Mc96fwLRp06JDhw5RVVX1/m54H1cNGTIk71xPO9vXb6+//np+GenkyZMjvbRUI0CAAAECBAgQIECAAAECBAgQIECAQLkJpCg8Ve9Y+12VmzpHO9Y3Vc59BAgQIECAAAECBAgQIECAAAECBAgQIFCRAoL1ilx2kyZAgAABAgQIECBAgAABAgQIECBAgACBTRXw8tJNlWtm9/36179ucMTphaUvvPBCg+edIECAAAECBAgQIECAAAECBAgQIECAAIF/Cdix7ttAgAABAgQIECBAgAABAgQIECBAgAABAgQ2QkCwvhFYLiVAgAABAgQIECBAgAABAgQIECBAgAABAoJ13wECBAgQIECAAAECBAgQIECAAAECBAgQILARAoL1jcByKQECBAgQIECAAAECBAgQIECAAAECBAgQEKyX4HegTZs2sWbNmhIcmSERIECAAAECBAgQIECAAAECBAgQIECgeQqkzLV169aFDF6wXghjsZ106dIlVqxYIVwvllVvBAgQIECAAAECBAgQIECAAAECBAhUqEAK1VPmmrLXIlqrIjrRR7ECXbt2jerq6li4cGGsXLmy2M71RoAAAQIECBAgQIAAAQIECBAgQIAAgQoTSFVCOnfuHN26dStk5lU1AW51IT3phAABAgQIECBAgAABAgQIECBAgAABAgQIVICAUjAVsMimSIAAAQIECBAgQIAAAQIECBAgQIAAAQLFCQjWi7PUEwECBAgQIECAAAECBAgQIECAAAECBAhUgIBgvQIW2RQJECBAgAABAgQIECBAgAABAgQIECBAoDgBwXpxlnoiQIAAAQIECBAgQIAAAQIECBAgQIAAgQoQEKxXwCKbIgECBAgQIECAAAECBAgQIECAAAECBAgUJyBYL85STwQIECBAgAABAgQIECBAgAABAgQIECBQAQKC9QpYZFMkQIAAAQIECBAgQIAAAQIECBAgQIAAgeIEBOvFWeqJAAECBAgQIECAAAECBAgQIECAAAECBCpAoFUFzNEUS0xgwYIFsWjRolixYkWJjcxwCBAgQIAAAQIECBAgQIAAAQIECBAoF4F27dpFp06domvXroVPSbBeOKkO300ghepLliyJLl26RKtWvn7vZuUcAQIECBAgQIAAAQIECBAgQIAAAQKbLrB69epYvHhx7qDocF2yuenr4s5NEEg71bt37x4f/vCHo0WLFlFVVbUJvbiFAAECBAgQIECAAAECBAgQIECAAAECDQtUV1fHmjVr8ubeefPmCdYbpqrcM+kvL9dee23cd999kXaEd+zYMQ466KAYMWJEDrAbo910001x//33x/XXX79R3afyL+3bt7dbfaPUXEyAAAECBAgQIECAAAECBAgQIECAwMYIpA29aWNvyiIboyS1Hesbsxoleu24ceNyqH7yySdH7969c7ieAu9Zs2bFNddcU3KjbtmyZcmNyYAIECBAgAABAgQIECBAgAABAgQIECg/gcbKIgXrZfBdSaH66aefHkcffXTdbHbdddc46aSTcrjet2/fkpql8i8ltRwGQ4AAAQIECBAgQIAAAQIECBAgQKBsBRorixSsl8FXpk2bNjF37tx1ZtKvX7+46qqrYrvttsvHV61aFT/96U/j3nvvjXfeeScGDx4c55xzTn4rbmoLFy6Miy++OP785z/H1ltvHYcddlicdtppkfpO7YUXXogf/vCH8cwzz0QK7Xfbbbd8PLVUiubSSy+NKVOm5P9Wsccee8SoUaOiR48eddf4QIAAAQIECBAgQIAAAQIECBAgQIAAgXIRaFEuE6nkeXzta1/LpV/SDvVUa/2JJ57I4fmgQYNyDaHUfv7zn8cjjzwSY8eOzdekwPyMM87IBfxTGzlyZK45dMMNN+QA/dFHH40rrrgin3v77bfztSmkv+WWW+LII4+M2267LZ9LbcKECfH444/n4P7mm2+O9N8rxowZU3feBwIECBAgQIAAAQIECBAgQIAAAQIECJSTgB3rZbCaxxxzTOy4445x++23xy9/+cscom+77bZx5plnxuGHHx4rV66MW2+9NQflAwYMyDP+zne+EwcffHBMnz490n+HSCVj0g73du3a5fNpx/nw4cNzoJ4C+SVLlsS5554bW2yxRWy//fY5vP/73/+er0275dPxj3zkI/llqd/+9rdj/vz5+ZxGgAABAgQIECBAgAABAgQIECBAgACBchMQrJfJiqbAPP2kHeipXEsK2f/zP/8zOnfunMu9pHA9Be1rt1S25cUXX4zq6uq8K/2QQw5Z53wq8ZJC8xSg9+rVK4fntS2VmqkN1lOwn8rAHHrooTFw4MD49Kc/nXe1awQIECBAgAABAgQIECBAgAABAgQIEChHAcF6M1/Vp59+Ou9ST+VbUkvlXFL98/STQvOHHnoohg4dms+lUi1pJ/varUOHDpFeftqtW7e803391rVr1/UP5d9btfrXVyeF7nfccUf88Y9/zD9p5/vdd9+dy8qsfV29HTlIgAABAgQIECBAgAABAgQIECBAgACBZiagxnozW7D1h7vlllvGb3/72/jDH/6wzqm0C3358uWx1VZb5ZeIprrnqTxLz54980/ayZ5Kw8ybNy969+4dr776aq67Xnt+6dKlceWVV+Yd8KnMTArply1bVveMmTNn1n2+6667YurUqXnH+3e/+91c7/25557L92gECBAgQIAAAQIECBAgQIAAAQIECBAoNwE71pv5iqZ655/5zGdi9OjR8fnPfz769+8fixcvjt/97nexYMGCOOqoo3Ld9GHDhsW4ceMi7VBPQfvPfvazSLvd027zvn375vD8vPPOi3POOSeH6d///vfzdenevffeOwfx6YWkp512Wg7NJ06cmO9JbdGiRTF+/PhcXz294HTSpEk50E811zUCBAgQIECAAAECBAgQIECAAAECBAiUm0BVzc7m6nKbVKXNZ9WqVbkcTCrpkmqip53nqd766aefXhd+p3rqaYf65MmTI33efffdY+TIkdGnT5/M9corr8Qll1wSjz32WLRt2zb233//OPvss6N9+/b5/Jw5c+KCCy6IJ598Mr+8dN9998271NPu9FSL/cc//nGus55ecrrLLrvEN7/5zRzyr9+mTZuW67CnF6ZqBAgQIECAAAECBAgQIECAAAECBAgQaEyBFH9Pnz499txzz0IfI1gvlFNn7yUgWH8vIecJECBAgAABAgQIECBAgAABAgR2F6AwAAARg0lEQVQIEChKoLGCdTXWi1oh/RAgQIAAAQIECBAgQIAAAQIECBAgQIBARQgI1itimU2SAAECBAgQIECAAAECBAgQIECAAAECBIoSEKwXJakfAgQIECBAgAABAgQIECBAgAABAgQIEKgIAcF6RSyzSRIgQIAAAQIECBAgQIAAAQIECBAgQIBAUQKC9aIk9UOAAAECBAgQIECAAAECBAgQIECAAAECFSEgWK+IZTZJAgQIECBAgAABAgQIECBAgAABAgQIEChKQLBelKR+CBAgQIAAAQIECBAgQIAAAQIECBAgQKAiBATrFbHMJkmAAAECBAgQIECAAAECBAgQIECAAAECRQkI1ouS1A8BAgQIECBAgAABAgQIECBAgAABAgQIVISAYL0iltkkCRAgQIAAAQIECBAgQIAAAQIECBAgQKAoAcF6UZL6IUCAAAECBAgQIECAAAECBAgQIECAAIGKEBCsV8QymyQBAgQIECBAgAABAgQIECBAgAABAgQIFCUgWC9KUj8ECBAgQIAAAQIECBAgQIAAAQIECBAgUBECgvWKWGaTJECAAAECBAgQIECAAAECBAgQIECAAIGiBATrRUnqhwABAgQIECBAgAABAgQIECBAgAABAgQqQkCwXhHLXDqTbNeuXSxfvrx0BmQkBAgQIECAAAECBAgQIECAAAECBAiUrUDKIlMmWXQTrBctqr93FejUqVPMmzdPuP6uSk4SIECAAAECBAgQIECAAAECBAgQILC5AilUT1lkyiSLblXVNa3oTvVH4N0EFixYEIsWLYoVK1a822XOESBAgAABAgQIECBAgAABAgQIECBAYJMF0k71FKp37dp1k/to6EbBekMyjhMgQIAAAQIECBAgQIAAAQIECBAgQIAAgXoElIKpB8UhAgQIECBAgAABAgQIECBAgAABAgQIECDQkIBgvSEZxwkQIECAAAECBAgQIECAAAECBAgQIECAQD0CgvV6UBwiQIAAAQIECBAgQIAAAQIECBAgQIAAAQINCQjWG5JxnAABAgQIECBAgAABAgQIECBAgAABAgQI1CMgWK8HxSECBAgQIECAAAECBAgQIECAAAECBAgQINCQgGC9IRnHCRAgQIAAAQIECBAgQIAAAQIECBAgQIBAPQKC9XpQHCJAgAABAgQIECBAgAABAgQIECBAgAABAg0JCNYbknGcAAECBAgQIECAAAECBAgQIECAAAECBAjUIyBYrwfFIQIECBAgQIAAAQIECBAgQIAAAQIECBAg0JCAYL0hGccJECBAgAABAgQIECBAgAABAgQIECBAgEA9AoL1elAcIkCAAAECBAgQIECAAAECBAgQIECAAAECDQkI1huScZwAAQIECBAgQIAAAQIECBAgQIAAAQIECNQjIFivB8UhAgQIECBAgAABAgQIECBAgAABAgQIECDQkIBgvSEZxwkQIECAAAECBAgQIECAAAECBAgQIECAQD0CgvV6UBwiQIAAAQIECBAgQIAAAQIECBAgQIAAAQINCQjWG5JxnAABAgQIECBAgAABAgQIECBAgAABAgQI1CMgWK8HxSECBAgQIECAAAECBAgQIECAAAECBAgQINCQgGC9IRnHCRAgQIAAAQIECBAgQIAAAQIECBAgQIBAPQKt6jnmUAkJXP3rh2PykzNLaETNbShVcVj/vvH1Ifs0t4EbLwECBAgQIECAAAECBAgQIECAAAECJSogWC/Rhakd1uQnZ8Wy1xaW+ChLe3iTn6wWrJf2EhkdAQIECBAgQIAAAQIECBAgQIAAgWYloBRMyS9XdcmP0AAJECBAgAABAgQIECBAgAABAgQIECBQSQKC9UpabXMlQIAAAQIECBAgQIAAAQIECBAgQIAAgc0WEKxvNqEOCBAgQIAAAQIECBAgQIAAAQIECBAgQKCSBATrlbTa5kqAAAECBAgQIECAAAECBAgQIECAAAECmy0gWN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etSr+VrPDXSNAgAABAgQIECBAgAABAgQIECBAgEApCwjWS3l1GmlsZw49OL5SU4Yl7VC/8XePxshrJ8QbS9+KQTvvkJ9YUyUml3ipbW1bb1gxqHXrluuMbvWampv+t61e807+lMrNpPb2qtXr/F5fUP+/t/qHAAECBAgQIECAAAECBAgQIECAAAECJS+wYWJa8kM2wM0VWFO9Jg7aY9doUdUinp+3MPps1yk61tREf+y52bnrpW8tjxY19dIP6r9zDsU/VlPaZf123KcGx+1/nBYH9v9oPvXk7DnrX7JRv696553YZqsPxT677hAP/+3vG3WviwkQIECAAAECBAgQIECAAAECBAgQINCUAnasN6V2iTxr/K//GJNrXji6+w494iuH7RN77tQ7Hnryubh60u/zCCdNeypmzX01Tjp0n9h/t53j0Wc3DLof+dsLMfzw/eOjPbvGTVP+HDNmz9us2f1+xnN5l/zxB+wVbVv5e89mYbqZAAECBAgQIECAAAECBAgQIECAAIFGFaiqKdfxrxoejfoonW+KwLBLro9lr/2zNvmm3O+empru23aOCed8BQUBAgQIECBAgAABAgQIECBAgAABAgQKEbBjvRBGnRAgQIAAAQIECBAgQIAAAQIECBAgQIBApQgI1itlpc2TAAECBAgQIECAAAECBAgQIECAAAECBAoREKwXwqgTAgQIECBAgAABAgQIECBAgAABAgQIEKgUAcF6pay0eRIgQIAAAQIECBAgQIAAAQIECBAgQIBAIQKC9UIYdUKAAAECBAgQIECAAAECBAgQIECAAAEClSIgWK+UlTZPAgQIECBAgAABAgQIECBAgAABAgQIEChEQLBeCKNOCBAgQIAAAQIECBAgQIAAAQIECBAgQKBSBATrlbLS5kmAAAECBAgQIECAAAECBAgQIECAAAEChQgI1gth1AkBAgQIECBAgAABAgQIECBAgAABAgQIVIqAYL3kV7qq5EdY+gNkWPprZIQECBAgQIAAAQIECBAgQIAAAQIEmo9Aq+Yz1Moc6YH9dogHnk5zr65MgAJmnQw1AgQIECBAgAABAgQIECBAgAABAgQIFCVQVV3TiupMPwQIECBAgAABAgQIECBAgAABAgQIECBAoNwFlIIp9xU2PwIECBAgQIAAAQIECBAgQIAAAQIECBAoVECwXiinzggQIECAAAECBAgQIECAAAECBAgQIECg3AUE6+W+wuZHgAABAgQIECBAgAABAgQIECBAgAABAoUKCNYL5dQZAQIECBAgQIAAAQIECBAgQIAAAQIECJS7gGC93FfY/AgQIECAAAECBAgQIECAAAECBAgQIECgUAHBeqGcOiNAgAABAgQIECBAgAABAgQIECBAgACBchcQrJf7CpsfAQIECBAgQIAAAQIECBAgQIAAAQIECBQqIFgvlFNnBAgQIECAAAECBAgQIECAAAECBAgQIFDuAoL1cl9h8yNAgAABAgQIECBAgAABAgQIECBAgACBQgUE64Vy6owAAQIECBAgQIAAAQIECBAgQIAAAQIEyl1AsF7uK2x+BAgQIECAAAECBAgQIECAAAECBAgQIFCogGC9UE6dESBAgAABAgQIECBAgAABAgQIECBAgEC5CwjWy32FzY8AAQIECBAgQIAAAQIECBAgQIAAAQIEChUQrBfKqTMCBAgQIECAAAECBAgQIECAAAECBAgQKHcBwXq5r7D5ESBAgAABAgQIECBAgAABAgQIECBAgEChAoL1Qjl1RoAAAQIECBAgQIAAAQIECBAgQIAAAQLlLiBYL/cVNj8CBAgQIECAAAECBAgQIECAAAECBAgQKFRAsF4op84IECBAgAABAgQIECBAgAABAgQIECBAoNwFBOvlvsLmR4AAAQIECBAgQIAAAQIECBAgQIAAAQKFCgjWC+XUGQECBAgQIECAAAECBAgQIECAAAECBAiUu4BgvdxX2PwIECBAgAABAgQIECBAgAABAgQIECBAoFABwXqhnDojQIAAAQIECBAgQIAAAQIECBAgQIAAgXIXEKyX+wqbHwECBAgQIECAAAECBAgQIECAAAECBAgUKiBYL5RTZwQIECBAgAABAgQIECBAgAABAgQIECBQ7gKC9XJfYfMjQIAAAQIECBAgQIAAAQIECBAgQIAAgUIFBOuFcuqMAAECBAgQIECAAAECBAgQIECAAAECBMpdQLBe7itsfgQIECBAgAABAgQIECBAgAABAgQIECBQqIBgvVBOnREgQIAAAQIECBAgQIAAAQIECBAgQIBAuQsI1st9hc2PAAECBAgQIECAAAECBAgQIECAAAECBAoVEKwXyqkzAgQIECBAgAABAgQIECBAgAABAgQIECh3AcF6ua+w+REgQIAAAQIECBAgQIAAAQIECBAgQIBAoQKC9UI5dUaAAAECBAgQIECAAAECBAgQIECAAAEC5S4gWC/3FTY/AgQIECBAgAABAgQIECBAgAABAgQIEChUQLBeKKfOCBAgQIAAAQIECBAgQIAAAQIECBAgQKDcBQTr5b7C5keAAAECBAgQIECAAAECBAgQIECAAAEChQoI1gvl1BkBAgQIECBAgAABAgQIECBAgAABAgQIlLuAYL3cV9j8CBAgQIAAAQIECBAgQIAAAQIECBAgQKBQAcF6oZw6I0CAAAECBAgQIECAAAECBAgQIECAAIFyFxCsl/sKmx8BAgQIECBAgAABAgQIECBAgAABAgQIFCogWC+UU2cECBAgQIAAAQIECBAgQIAAAQIECBAgUO4CgvVyX2HzI0CAAAECBAgQIECAAAECBAgQIECAAIFCBQTrhXLqjAABAgQIECBAgAABAgQIECBAgAABAgTKXUCwXu4rbH4ECBAgQIAAAQIECBAgQIAAAQIECBAgUKjA/wc/VBhQi7ukjgAAAABJRU5ErkJggg==" alt="" data-iml="463254">
El miércoles, 30 de septiembre de 2020 a las 17:19:40 UTC+2, [hidden email] escribió:
How should your configuration look like? What values should be changed by the user?

Am 30.09.2020 um 15:52 schrieb Miguel Campos <[hidden email]>:


Hello guys I need some help with a form for the global config.

I'm trying to modify the default config sample plugin and mixing it with the samples of the UI-sample plugin.

so finaly I can create my own configuration for my plugin.
but I'm really strugling.

This is the Jelly file.

-----------
file name: config.jelly
in package: io.jenkins.plugins.sample.SampleConfiguration
---------------
<?xml version="1.0" encoding="UTF-8"?>
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:s="/lib/samples">
    <f:section title="${%01Test Form}">
        <f:entry field="label" title="${%Label}">
            <f:textbox/>
        </f:entry>
        <j:set var="currentFruit" value="${it.fruit}" defaultValue="noneRamone"/>
        <f:block>Esta es mi current Fruit "${currentFruit.displayName}"</f:block>
        <f:dropdownList name="fruit" title="Fruits">
          <j:forEach var="descriptor" items="${it.fruitDescriptors()}" varStatus="loop">
            <j:set var="fruit" value="${descriptor==currentFruit.descriptor?currentFruit:null}"/>
            <f:dropdownListBlock title="${descriptor.displayName}" value="${loop.index}"
                                 selected="${fruit!=null}" staplerClass="${descriptor.clazz.name}">
              <st:include page="${descriptor.configPage}" class="${descriptor.clazz}"/>
            </f:dropdownListBlock>
          </j:forEach>
        </f:dropdownList>

    </f:section>
</j:jelly>
-----------------


The thing is for the textbox label it get the information from the Java class right.
but for the j:set current Fruit  I gues it should execute the method get Fruit() from the same class but it does not.
I have traces and the method is never executed.

I'm lost no idea what I'm doing wrong
I guess the same is happening for the j:forEach to fullfill all the options inthe dropdown list.

any ideas?

I must admit I have verry little jelly knowledge and I'm also struging to find documentation that helps with this.

Thanks for your help.


--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/4766705e-6cce-4e56-b04d-6a3997e21f07n%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/f2a0a21b-78da-4f1d-a574-efbba3b4ed28n%40googlegroups.com.