提交 4bd418aa 编写于 作者: K Kohsuke Kawaguchi

added a more databound version of <f:repeatable>

上级 a4085beb
<!--
The MIT License
Copyright (c) 2010, CloudBees, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<st:documentation> <![CDATA[]
Data-bound only version of <f:repeatable> that assumes the type pointed by the property is data-bound as well.
]]>
<st:attribute name="field">
Used for the data binding.
</st:attribute>
<st:attribute name="noAddButton">
true if the default 'add' button (that adds a new copy) shouldn't be displayed.
When you use this attribute,
</st:attribute>
<st:attribute name="add">
If specified, this text will replace the standard "Add" text.
</st:attribute>
<st:attribute name="minimum">
At least provide this number of copies initially.
minimum="1" is useful to make sure there's always at least one entry for the user to fill in.
</st:attribute>
<st:attribute name="header">
For each item, add this header.
This also activates drag&amp;drop (where the header is a grip).
</st:attribute>
</st:documentation>
<f:repeatable field="${attrs.field}" noAddButton="${attrs.noAddButton}" header="${attrs.header}">
<table style="width:100%">
<st:include page="config.jelly" class="${descriptor.clazz}" />
</table>
</f:repeatable>
</j:jelly>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册