java - Jenkins Plugin: Select filled by model -


i'm trying use this:

public listboxmodel dofillgoaltypeitems() {     listboxmodel items = new listboxmodel();     (buildgoal goal : getbuildgoals()) {         items.add(goal.getdisplayname(), goal.getid());     }     return items; }  <f:entry field="goaltype" title="choose goal type">     <f:select /> </f:entry 

that sample works in configuration section, select not filled when used in rootaction. following error:

post http://localhost:8080/jenkins/my-plugin/null 404 (not found) no matching rule found on <com.my.plugin.myrootaction@1aa70942> "/null" 

i've tried dofillxyzitems method either inside or outside descriptor , nothing seems help.

any ideas?

i tried myself , came conclusion descriptor architecture doesn't work rootactions.

you can @ abandoned project (groovy , groovy forms) inspiration (and other rootactions)

in classes things this

@extension public class dsllink extends managementlink implements describable<dsllink> {     private factory factory = new factory();     private string dslinterface 

and in jelly/groovy forms

    <j:foreach  var="cat" items="${it.factory.categoriesaslist}" >       <tr>         <td><f:readonlytextbox value="${cat.name}"/></td>         <td><f:readonlytextbox value="${cat.description}"/></td>         <td></td>         <td></td> 

i think syntax different jelly

as separate resource, file-scm plugin predates databound constructor/descriptor architecture populates jelly views same way rootactions do.

you might better ask people on jenkins developer forum too


Comments