Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
jenkins
提交
450b76ca
J
jenkins
项目概览
xxadev
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
450b76ca
编写于
5月 19, 2011
作者:
A
Andrew Bayer
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of github.com:jenkinsci/jenkins
上级
9610fe55
ee8de0f9
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
432 addition
and
3 deletion
+432
-3
core/src/main/resources/lib/form/repeatable.jelly
core/src/main/resources/lib/form/repeatable.jelly
+5
-2
core/src/main/resources/lib/form/repeatableProperty.jelly
core/src/main/resources/lib/form/repeatableProperty.jelly
+4
-1
test/src/test/java/lib/form/RepeatablePropertyTest.java
test/src/test/java/lib/form/RepeatablePropertyTest.java
+159
-0
test/src/test/java/lib/form/RepeatableTest.java
test/src/test/java/lib/form/RepeatableTest.java
+57
-0
test/src/test/resources/lib/form/RepeatablePropertyTest/ExcitingObject/config.jelly
...b/form/RepeatablePropertyTest/ExcitingObject/config.jelly
+31
-0
test/src/test/resources/lib/form/RepeatablePropertyTest/noDefault.jelly
...resources/lib/form/RepeatablePropertyTest/noDefault.jelly
+41
-0
test/src/test/resources/lib/form/RepeatablePropertyTest/withDefault.jelly
...sources/lib/form/RepeatablePropertyTest/withDefault.jelly
+41
-0
test/src/test/resources/lib/form/RepeatableTest/defaultForField.jelly
...t/resources/lib/form/RepeatableTest/defaultForField.jelly
+48
-0
test/src/test/resources/lib/form/RepeatableTest/defaultForItems.jelly
...t/resources/lib/form/RepeatableTest/defaultForItems.jelly
+46
-0
未找到文件。
core/src/main/resources/lib/form/repeatable.jelly
浏览文件 @
450b76ca
...
...
@@ -81,6 +81,9 @@ THE SOFTWARE.
<st:attribute name="items">
The item collection to loop over. Required unless @field is given.
</st:attribute>
<st:attribute name="default">
Use this collection for items if items or @field is null
</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,
...
...
@@ -107,14 +110,14 @@ THE SOFTWARE.
<j:when test="${attrs.field!=null}">
<j:set var="name" value="${field}"/>
<j:set var="var" value="instance"/>
<j:set var="items" value="${instance[name]}"/>
<j:set var="items" value="${instance[name]
?: attrs.default
}"/>
<!-- and expose update descriptor to the body of this tag -->
<j:set var="descriptor" value="${descriptor.getPropertyType(instance,field).itemTypeDescriptor}" />
</j:when>
<j:otherwise>
<j:set var="name" value="${attrs.name?:attrs.var}"/>
<j:set var="items" value="${attrs.items}"/>
<j:set var="items" value="${attrs.items
?: attrs.default
}"/>
</j:otherwise>
</j:choose>
...
...
core/src/main/resources/lib/form/repeatableProperty.jelly
浏览文件 @
450b76ca
...
...
@@ -31,6 +31,9 @@ THE SOFTWARE.
<st:attribute name="field">
Used for the data binding.
</st:attribute>
<st:attribute name="default">
The default value to use for this collection when 'instance[field]' is null.
</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,
...
...
@@ -49,7 +52,7 @@ THE SOFTWARE.
</st:documentation>
<f:repeatable field="${attrs.field}" noAddButton="${attrs.noAddButton}" header="${attrs.header}">
<f:repeatable field="${attrs.field}"
default="${attrs.default}"
noAddButton="${attrs.noAddButton}" header="${attrs.header}">
<table style="width:100%">
<st:include page="config.jelly" class="${descriptor.clazz}" />
</table>
...
...
test/src/test/java/lib/form/RepeatablePropertyTest.java
0 → 100644
浏览文件 @
450b76ca
/*
* The MIT License
*
* Copyright (C) 2010-2011 by Anthony Robinson
*
* 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.
*/
package
lib.form
;
import
com.gargoylesoftware.htmlunit.html.HtmlElement
;
import
com.gargoylesoftware.htmlunit.html.HtmlForm
;
import
com.gargoylesoftware.htmlunit.html.HtmlPage
;
import
com.gargoylesoftware.htmlunit.html.HtmlTextInput
;
import
hudson.Extension
;
import
hudson.model.Describable
;
import
hudson.model.Descriptor
;
import
hudson.model.Hudson
;
import
org.jvnet.hudson.test.HudsonTestCase
;
import
org.kohsuke.stapler.DataBoundConstructor
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
public
class
RepeatablePropertyTest
extends
HudsonTestCase
implements
Describable
<
RepeatablePropertyTest
>
{
private
static
final
String
VIEW_WITHOUT_DEFAULT
=
"noDefault"
;
private
static
final
String
VIEW_WITH_DEFAULT
=
"withDefault"
;
public
ArrayList
<
ExcitingObject
>
testRepeatable
;
public
ArrayList
<
ExcitingObject
>
defaults
;
public
void
testSimple
()
throws
Exception
{
testRepeatable
=
createRepeatable
();
assertFormContents
(
VIEW_WITHOUT_DEFAULT
,
testRepeatable
);
}
public
void
testNullFieldNoDefault
()
throws
Exception
{
assertFormContents
(
VIEW_WITHOUT_DEFAULT
,
new
ArrayList
<
ExcitingObject
>());
}
public
void
testNullFieldWithDefault
()
throws
Exception
{
defaults
=
createRepeatable
();
assertFormContents
(
VIEW_WITH_DEFAULT
,
defaults
);
}
public
void
testFieldNotNullWithDefaultIgnoresDefaults
()
throws
Exception
{
testRepeatable
=
createRepeatable
();
defaults
=
new
ArrayList
<
ExcitingObject
>(
Arrays
.
asList
(
new
ExcitingObject
(
"This default should be ignored"
),
new
ExcitingObject
(
"Ignore me too"
)
));
assertFormContents
(
VIEW_WITH_DEFAULT
,
testRepeatable
);
}
private
void
assertFormContents
(
final
String
viewName
,
final
ArrayList
<
ExcitingObject
>
expected
)
throws
Exception
{
final
HtmlForm
form
=
getForm
(
viewName
);
final
List
<
HtmlTextInput
>
inputs
=
toTextInputList
(
form
.
getElementsByAttribute
(
"input"
,
"type"
,
"text"
));
assertEquals
(
"size"
,
expected
.
size
(),
inputs
.
size
());
for
(
int
i
=
0
;
i
<
expected
.
size
();
i
++)
assertEquals
(
expected
.
get
(
i
).
greatProperty
,
inputs
.
get
(
i
).
getValueAttribute
());
}
private
List
<
HtmlTextInput
>
toTextInputList
(
final
List
<
HtmlElement
>
inputs
)
{
assertNotNull
(
inputs
);
final
List
<
HtmlTextInput
>
textInputList
=
new
ArrayList
<
HtmlTextInput
>();
for
(
HtmlElement
input
:
inputs
)
{
assertTrue
(
input
instanceof
HtmlTextInput
);
textInputList
.
add
((
HtmlTextInput
)
input
);
}
return
textInputList
;
}
private
ArrayList
<
ExcitingObject
>
createRepeatable
()
{
return
new
ArrayList
<
ExcitingObject
>(
Arrays
.
asList
(
new
ExcitingObject
(
"A nice thing"
),
new
ExcitingObject
(
"I'm even better"
),
new
ExcitingObject
(
"Don't bother, I'm not exciting at all"
)
));
}
private
HtmlForm
getForm
(
final
String
viewName
)
throws
Exception
{
final
HtmlPage
page
=
createWebClient
().
goTo
(
"self/"
+
viewName
);
final
HtmlForm
form
=
page
.
getFormByName
(
"config"
);
return
form
;
}
public
DescriptorImpl
getDescriptor
()
{
return
hudson
.
getDescriptorByType
(
DescriptorImpl
.
class
);
}
@Extension
public
static
final
class
DescriptorImpl
extends
Descriptor
<
RepeatablePropertyTest
>
{
@Override
public
String
getDisplayName
()
{
return
"RepeatablePropertyTest"
;
}
}
public
static
final
class
ExcitingObject
implements
Describable
<
ExcitingObject
>
{
private
final
String
greatProperty
;
@DataBoundConstructor
public
ExcitingObject
(
final
String
greatProperty
)
{
this
.
greatProperty
=
greatProperty
;
}
public
String
getGreatProperty
()
{
return
greatProperty
;
}
public
Descriptor
<
ExcitingObject
>
getDescriptor
()
{
return
Hudson
.
getInstance
().
getDescriptor
(
ExcitingObject
.
class
);
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
ExcitingObject
that
=
(
ExcitingObject
)
o
;
if
(
greatProperty
!=
null
?
!
greatProperty
.
equals
(
that
.
greatProperty
)
:
that
.
greatProperty
!=
null
)
return
false
;
return
true
;
}
@Override
public
int
hashCode
()
{
return
greatProperty
!=
null
?
greatProperty
.
hashCode
()
:
0
;
}
@Override
public
String
toString
()
{
return
"ExcitingObject["
+
greatProperty
+
']'
;
}
@Extension
public
static
final
class
ExcitingDescriptor
extends
Descriptor
<
ExcitingObject
>
{
public
ExcitingDescriptor
()
{
super
(
ExcitingObject
.
class
);
}
@Override
public
String
getDisplayName
()
{
return
"This is an awesome thing!"
;
}
}
}
}
test/src/test/java/lib/form/RepeatableTest.java
浏览文件 @
450b76ca
...
...
@@ -53,6 +53,7 @@ public class RepeatableTest extends HudsonTestCase {
private
Class
<?>
bindClass
;
private
List
<?>
bindResult
;
public
List
<
Object
>
list
=
new
ArrayList
<
Object
>();
public
List
<
Object
>
defaults
=
null
;
public
Integer
minimum
=
null
;
public
void
doSubmitTest
(
StaplerRequest
req
)
throws
Exception
{
...
...
@@ -135,6 +136,62 @@ public class RepeatableTest extends HudsonTestCase {
+
"{\"bool\":true,\"txt\":\"existing two\"},{\"bool\":false,\"txt\":\"new one\"}]"
,
formData
.
get
(
"foos"
).
toString
());
}
public
void
testNoData
()
throws
Exception
{
list
=
null
;
defaults
=
null
;
gotoAndSubmitConfig
(
"defaultForField"
);
assertNull
(
formData
.
get
(
"list"
));
gotoAndSubmitConfig
(
"defaultForItems"
);
assertNull
(
formData
.
get
(
"list"
));
}
public
void
testItemsWithDefaults
()
throws
Exception
{
assertWithDefaults
(
"defaultForItems"
);
}
public
void
testItemsDefaultsIgnoredIfFieldHasData
()
throws
Exception
{
assertDefaultsIgnoredIfHaveData
(
"defaultForItems"
);
}
public
void
testFieldWithDefaults
()
throws
Exception
{
assertWithDefaults
(
"defaultForField"
);
}
public
void
testFieldDefaultsIgnoredIfFieldHasData
()
throws
Exception
{
assertDefaultsIgnoredIfHaveData
(
"defaultForField"
);
}
private
void
addDefaults
()
{
defaults
=
new
ArrayList
<
Object
>();
defaults
.
add
(
new
Foo
(
"default one"
,
true
));
defaults
.
add
(
new
Foo
(
"default two"
,
false
));
}
private
void
assertWithDefaults
(
final
String
viewName
)
throws
Exception
{
list
=
null
;
addDefaults
();
gotoAndSubmitConfig
(
viewName
);
assertNotNull
(
formData
.
get
(
"list"
));
assertEquals
(
"[{\"bool\":true,\"txt\":\"default one\"},{\"bool\":false,\"txt\":\"default two\"}]"
,
formData
.
get
(
"list"
).
toString
());
}
private
void
assertDefaultsIgnoredIfHaveData
(
final
String
viewName
)
throws
Exception
{
addData
();
addDefaults
();
gotoAndSubmitConfig
(
viewName
);
assertNotNull
(
formData
.
get
(
"list"
));
assertEquals
(
"[{\"bool\":true,\"txt\":\"existing one\"},{\"bool\":false,\"txt\":\"existing two\"}]"
,
formData
.
get
(
"list"
).
toString
());
}
private
void
gotoAndSubmitConfig
(
final
String
viewName
)
throws
Exception
{
HtmlPage
p
=
createWebClient
().
goTo
(
"self/"
+
viewName
);
HtmlForm
f
=
p
.
getFormByName
(
"config"
);
submit
(
f
);
}
// ========================================================================
...
...
test/src/test/resources/lib/form/RepeatablePropertyTest/ExcitingObject/config.jelly
0 → 100644
浏览文件 @
450b76ca
<?jelly escape-by-default='true'?>
<!--
~ The MIT License
~
~ Copyright (C) 2010-2011 by Anthony Robinson
~
~ 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">
<f:entry field="greatProperty">
<f:textbox/>
</f:entry>
</j:jelly>
test/src/test/resources/lib/form/RepeatablePropertyTest/noDefault.jelly
0 → 100644
浏览文件 @
450b76ca
<?jelly escape-by-default='true'?>
<!--
~ The MIT License
~
~ Copyright (C) 2010-2011 by Anthony Robinson
~
~ 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">
<l:layout title="Testing repeatableProperty without default attribute">
<l:main-panel>
<f:form method="post" name="config" action="thisFormIsOnlyInspectedInTheTests">
<j:set var="instance" value="${it}"/>
<j:set var="descriptor" value="${it.descriptor}"/>
<f:entry title="Exciting Objects">
<f:repeatableProperty field="testRepeatable"/>
</f:entry>
</f:form>
</l:main-panel>
</l:layout>
</j:jelly>
test/src/test/resources/lib/form/RepeatablePropertyTest/withDefault.jelly
0 → 100644
浏览文件 @
450b76ca
<?jelly escape-by-default='true'?>
<!--
~ The MIT License
~
~ Copyright (C) 2010-2011 by Anthony Robinson
~
~ 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">
<l:layout title="Testing repeatableProperty with default attribute">
<l:main-panel>
<f:form method="post" name="config" action="thisFormIsOnlyInspectedInTheTests">
<j:set var="instance" value="${it}"/>
<j:set var="descriptor" value="${it.descriptor}"/>
<f:entry title="Exciting Objects">
<f:repeatableProperty field="testRepeatable" default="${it.defaults}"/>
</f:entry>
</f:form>
</l:main-panel>
</l:layout>
</j:jelly>
test/src/test/resources/lib/form/RepeatableTest/defaultForField.jelly
0 → 100644
浏览文件 @
450b76ca
<!--
The MIT License
Copyright (c) 2004-2010, Sun Microsystems, Inc., Alan Harder
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.
-->
<?jelly escape-by-default='true'?>
<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">
<l:layout title="Testing radio block in repeatable">
<l:main-panel>
<f:form method="post" name="config" action="submitTest">
<j:set var="instance" value="${it}"/>
<j:set var="descriptor" value="${it.descriptor}"/>
<f:repeatable field="list" default="${it.defaults}">
<table>
<f:entry>
<f:textbox name="txt" value="${instance.txt}"/>
</f:entry>
<f:entry>
<f:checkbox name="bool" checked="${instance.bool}"/>
</f:entry>
</table>
</f:repeatable>
<f:entry>
<f:submit value="submit"/>
</f:entry>
</f:form>
</l:main-panel>
</l:layout>
</j:jelly>
test/src/test/resources/lib/form/RepeatableTest/defaultForItems.jelly
0 → 100644
浏览文件 @
450b76ca
<!--
The MIT License
Copyright (c) 2004-2010, Sun Microsystems, Inc., Alan Harder
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.
-->
<?jelly escape-by-default='true'?>
<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">
<l:layout title="Testing radio block in repeatable">
<l:main-panel>
<f:form method="post" name="config" action="submitTest">
<f:repeatable var="foo" items="${it.list}" default="${it.defaults}" name="list" minimum="${it.minimum}">
<table>
<f:entry>
<f:textbox name="txt" value="${foo.txt}"/>
</f:entry>
<f:entry>
<f:checkbox name="bool" checked="${foo.bool}"/>
</f:entry>
</table>
</f:repeatable>
<f:entry>
<f:submit value="submit"/>
</f:entry>
</f:form>
</l:main-panel>
</l:layout>
</j:jelly>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录