Skip to content
Permalink
Browse files

[JENKINS-26781] set $class in submitted form to use descriptor.id, so…

… descriptor can be retrieved by ID, which _may_ not be clazz.name
  • Loading branch information...
ndeloof committed Feb 4, 2015
1 parent a944634 commit 57c9b4807b57e7d0e58894b53c806047e121ea1f
@@ -917,6 +917,8 @@ private URL getStaticHelpUrl(Klass<?> c, String suffix) {
Descriptor<T> d = find(descriptors, kind);
if (d != null) {
items.add(d.newInstance(req, jo));
} else {
LOGGER.warning("Received unexpected formData for descriptor " + kind);
}
}
}
@@ -27,14 +27,15 @@ THE SOFTWARE.
<st:documentation>
Invisible &lt;f:entry> type for embedding a descriptor's $class field.
<st:attribute name="clazz">
The describable class that we are instantiating via structured form submission.
The descriptor ID that we are instantiating via structured form submission.
In most cases, descriptor ID is the Describable class name.
</st:attribute>
<st:attribute name="descriptor">
The descriptor of the describable that we are instantiating via
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}" />

0 comments on commit 57c9b48

Please sign in to comment.
You can’t perform that action at this time.