提交 96187b71 编写于 作者: J Jesse Glick

f:repeatableProperty documentation talks about including...

f:repeatableProperty documentation talks about including f:repeatableDeleteButton, but then fails to actually call d:invokeBody.
While you could put the delete button at the end of the nested config.jelly, this is ugly since it prevents reuse;
better to specify the delete button in the form using f:repeatableProperty.
f:repeatableHeteroProperty already inserted a delete button automatically, so its documentation was incorrect.
上级 4373a602
......@@ -27,14 +27,6 @@ THE SOFTWARE.
<st:documentation> <![CDATA[
Data-bound only version of <f:hetero-list> that assumes the type pointed by the property is data-bound as well.
The nested property type must be Describable and it needs to have config.jelly.
The nested configuration fragment normally needs to have a delete button by adding a fragment like this:
<f:entry title="">
<div align="right">
<f:repeatableDeleteButton />
</div>
</f:entry>
]]>
<st:attribute name="field" use="required">
......
......@@ -28,7 +28,7 @@ THE SOFTWARE.
Data-bound only version of <f:repeatable> that assumes the type pointed by the property is data-bound as well.
The nested property type must be Describable and it needs to have config.jelly.
The nested configuration fragment normally needs to have a delete button by adding a fragment like this:
Unless that nested config.jelly already adds a delete button (deprecated), you should normally put the following inside this tag:
<f:entry title="">
<div align="right">
......@@ -64,6 +64,7 @@ THE SOFTWARE.
<f:repeatable field="${attrs.field}" default="${attrs.default}" noAddButton="${attrs.noAddButton}" header="${attrs.header}" add="${attrs.add}">
<table style="width:100%">
<st:include page="config.jelly" class="${descriptor.clazz}" />
<d:invokeBody/>
</table>
</f:repeatable>
</j:jelly>
......@@ -27,13 +27,7 @@ THE SOFTWARE.
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">
<f:section title="Entries">
<f:block>
<f:repeatableHeteroProperty field="entries" hasHeader="true">
<f:entry title="">
<div align="right">
<f:repeatableDeleteButton/>
</div>
</f:entry>
</f:repeatableHeteroProperty>
<f:repeatableHeteroProperty field="entries" hasHeader="true"/>
</f:block>
</f:section>
</j:jelly>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册