
lib.form.repeatable.jelly Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hudson-core Show documentation
Show all versions of hudson-core Show documentation
Contains the core Hudson code and view files to render HTML.
The newest version!
and repeatedly evaluate the body so that
initially all the items get their own copy. This tag also evaluate the body
once more with var=null to create a 'master copy', which is the template entry
used when a new copy is inserted.
h1. HTML structure
this tag mainly produces the nested DIVs with CSS classes as follows:
{noformat}
// container for the whole thing
... copy 1 ...
... copy 2 ...
...
{noformat}
The 'repeated-chunk' DIVs will also have additional CSS classes that represent
their positions among siblings:
first : first chunk among the siblings
last : last chunk among the siblings
middle: neither first nor last
only : it is the only chunk (automatically get first and last at the same time)
h1. Usage Note
The caller of this tag should define a button to add a new copy and delete
the current copy. Such buttons should have 'repeatable-add' CSS class and
'repeatable-delete' CSS class respectively (it can have other CSS classes),
so that their event handlers get properly wired up.
The positional CSS classes on 'repeated-chunk' DIVs (as explained above)
can be used to control the visibility of such buttons. For example, this allows
you to hide 'delete' button if there's only one item, or only show 'add' button
on the last row. There are a few CSS classes already defined in style.css
for this purpose.
]]>
variable that receives the item of the current iteration.
Accessible from the body. Required unless @field is given.
Status variable that indicates the loop status.
name used in the structured form submission. Defaults to the same name as @var.
Used for the data binding.
The item collection to loop over. Required unless @field is given.
true if the default 'add' button (that adds a new copy) shouldn't be displayed.
When you use this attribute,
If specified, this text will replace the standard "Add" text.
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.
For each item, add this header.
This also activates drag&drop (where the header is a grip).
${header}
${header}
${header}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy