I would like the ability to store a list of "Person"s, where is a Person has a name and a List of "Person"s I've spent hours on this and cannot figure out what my jelly file should look like. I'm currently running into stackoverflow errors when jenkins tries to render my script.
Is there anyway to achieve this? here is my code (essentially a derivative of HelloWorldBuilder):
===========HelloWorldBuilder config.jetty===========
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<f:entry title="Person Name" field="name">
<f:textbox />
</f:entry>
<f:entry title="Children">
<f:repeatableProperty field="children"/>
</f:entry>
</j:jelly>
===========end root config.jetty===========
===========child config.jetty===========
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<f:entry title="Child Name" field="name">
<f:textbox />
</f:entry>
<f:entry title="Children">
<f:repeatableProperty field="children"/>
</f:entry>
</j:jelly>
===========end child config.jetty===========
===========Child class=============
public class Child extends AbstractDescribableImpl<Child>{
public String name;
public List<Child> children;
@DataBoundConstructor
public Child(String name, List<Child> children) {
this.children=children;
}
@Extension
public static class DescriptorImpl extends Descriptor<Child> {
@Override
public String getDisplayName() {
return "";
}
}
}
==========end child class===========
root class is the same as the HelloWorldBuilder, with this instead:
public String name;
public List<Child> children;
// Fields in config.jelly must match the parameter names in the "DataBoundConstructor"
@DataBoundConstructor
public HelloWorldBuilder(String name, List<Child> children) {
this.children = children;
}