Skip to content

Commit

Permalink
[JENKINS-26781] set $class in submitted form to use descriptor.id, so…
Browse files Browse the repository at this point in the history
… descriptor can be retrieved by ID, which _may_ not be clazz.name
  • Loading branch information
ndeloof committed Feb 4, 2015
1 parent a944634 commit 3edce88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/src/main/java/hudson/model/Descriptor.java
Expand Up @@ -918,6 +918,7 @@ List<T> newInstancesFromHeteroList(StaplerRequest req, Object formData,
if (d != null) {
items.add(d.newInstance(req, jo));
}
LOGGER.warning("Received unexpected formData for descriptor " + kind);
}
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/form/class-entry.jelly
Expand Up @@ -34,7 +34,7 @@ THE SOFTWARE.
structured form submission. Mutually exclusive with clazz.
</st:attribute>
</st:documentation>
<j:set var="clazz" value="${attrs.clazz ?: attrs.descriptor.clazz.name}" />
<j:set var="clazz" value="${attrs.clazz ?: attrs.descriptor.id}" />
<f:invisibleEntry>
<!-- Legacy: Remove once plugins have been staged onto $class -->
<input type="hidden" name="stapler-class" value="${clazz}" />
Expand Down

0 comments on commit 3edce88

Please sign in to comment.