The question might look stupid, but i'm little confused about how to save
complex object. I was trying to update the HelloWorldBuilder, Updated the
code as following
private final String name;
private final FileDetails fileDetails;
@DataBoundConstructor
public HelloWorldBuilder(String name,FileDetails fileDetails) {
this.name = name;
this.fileDetails = fileDetails;
}
public String getName() {
return name;
}
public FileDetails getFileDetails() {
return fileDetails;
}
public class FileDetails implements Describable<FileDetails>{
final String fileList;
final String fileName;
@DataBoundConstructor
public FileDetails(String fileList, String fileName) {
this.fileList = fileList;
this.fileName = fileName;
}
public String getFileList() {
return fileList;
}
public String getFileName() {
return fileName;
}
public Descriptor<FileDetails> getDescriptor() {
return Jenkins.getInstance().getDescriptor(getClass());
}}
and the jelly file is as following
<f:entry title="Name" field="name">
<f:textbox />
</f:entry>
<f:entry title="fileDetails Name" field="fileDetails.fileName">
<f:textbox/>
</f:entry>
<f:entry title="fileDetails list" field="fileDetails.fileList">
<f:textbox"/>
</f:entry>
But the problem i'm facing is the fileDetails part is not getting saved.Can
someone please suggest an workaround?
--
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/groups/opt_out.