提交 9daa2288 编写于 作者: K Kohsuke Kawaguchi

Infer descriptors if unspecified.

上级 4f34b61d
......@@ -33,14 +33,18 @@ THE SOFTWARE.
<st:attribute name="title" use="required">
Human readable title of this control.
</st:attribute>
<st:attribute name="descriptors" use="required">
<st:attribute name="descriptors">
Collection that lists up all the valid candidate descriptors.
If unspecified, inferred from the type of the field.
</st:attribute>
<st:attribute name="default">
If specified, this will be chosen as the default value in case the current selection is null.
</st:attribute>
</st:documentation>
<f:dropdownList name="${attrs.field}" title="${attrs.title}">
<j:set target="${attrs}" property="descriptors" value="${attrs.descriptors ?: descriptor.getPropertyType(instance,attrs.field).getApplicableDescriptors()}" />
<f:dropdownList name="${attrs.field}" title="${attrs.title}" help="${descriptor.getHelpFile(attrs.field)}">
<d:invokeBody />
<j:set var="current" value="${instance[attrs.field]}"/>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册