I have a custom GlobalConfiguration with a List of Describables (which have
their own nested Descriptor). Adding new items to the List is persisted
perfectly with this code:
@Override
public boolean configure(StaplerRequest req, JSONObject json) throws
FormException {
req.bindJSON(this,json);
save();
return true;
}
public void setEndpoints(List<Endpoint> endpoints) {
this.endpoints = endpoints;
}
in the GlobalConfiguration. However, if I delete all of the items, the
JSONObject doesn't have an empty list, which means bindJSON never calls
setEndpoints with an empty list.
Do I have to handle this case myself, or am I doing something wrong which
should handle this automatically?
Thanks,
Ben
--
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.