Hi,

I'm having some trouble getting a <repeatable> tag in my global.jelly to 
load some data. I wonder if anyone could help? 

In my global plugin state I want to save a list of servers with different 
properties, so I added a ServerInfo class to my builder, declared as:

public static class ServerInfo extends AbstractDescribableImpl<ServerInfo> 
 {...}

In my main DescriptorImpl I then have a list of these:

 private final List<ServerInfo> servers;

and in the configure function I parse the JSON to add to the list. The data 
is loaded and saved correctly so in the plugin config xml I get:

<acme.rd.jenkins.div.runner.TestRunnerBuilder_-DescriptorImpl 
[email protected]">
  <servers>
    <acme.rd.jenkins.div.runner.TestRunnerBuilder_-ServerInfo>
      <name>Support</name>
      <host>localhost</host>
      <port>8080</port>
      <https>false</https>
    </acme.rd.jenkins.div.runner.TestRunnerBuilder_-ServerInfo>
    <acme.rd.jenkins.div.runner.TestRunnerBuilder_-ServerInfo>
      <name>Test</name>
      <host>localhost</host>
      <port>9090</port>
      <https>false</https>
    </acme.rd.jenkins.div.runner.TestRunnerBuilder_-ServerInfo>
  </servers>
  <rsyncOptions>-altD -W</rsyncOptions>
</acme.rd.jenkins.div.runner.TestRunnerBuilder_-DescriptorImpl>

This all works fine (e.g.my build stage can access the loaded data fine), 
however the global.jelly file won't load in the data for display/editing. 
My jelly looks like:

  <f:entry title="DART Server">
      <f:repeatable items="${descriptor.servers}" var="server" minimum="1">
          <table width="90%">
              <f:entry title="Name" >
                  <f:textbox name="server.name" />
              </f:entry>
              <f:entry title="Host" >
                  <f:textbox name="server.host"  />
              </f:entry>
              <f:entry title="Port" >
                  <f:textbox name="server.port" />
              </f:entry>
              <f:entry title="Use Https">
                  <f:checkbox name="server.https"  />
              </f:entry>  
          </table>       
          <f:repeatableDeleteButton />
      </f:repeatable>
  </f:entry>

The correct number of items is enumerated from servers container in the 
form, but the entries are empty. I seem to be missing something on the Java 
side, or my jelly is not correct.  Can anyone give any pointers to things 
to try?

Thanks for any help,
Andy

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to