I am trying to use a repeatable inside a config.jelly of my jenkins plugin:
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:s="/lib/samples" xmlns:f="/lib/form"
xmlns:l="/lib/layout">
<f:entry title="Some Title">
<f:checkbox title="Enable plugin" field="isMyPluginProject"/>
</f:entry>
<f:block>
<f:repeatable var="item" name="items" items="${instance.items}"
noAddButton="true" minimum="0">
<fieldset>
<f:entry title="My Title" description="Project desc." field="pattern">
<f:textbox value="${item.pattern}" default="" />
</f:entry>
</fieldset>
<f:repeatableDeleteButton />
</f:repeatable>
</f:block>
</j:jelly>
This produces the following javascript error:
Uncaught TypeError: Cannot read property 'hasClassName' of undefined
(anonymous function) @ repeatable.js:112
(anonymous function) @ behavior.js:111
(anonymous function) @ behavior.js:107
Behaviour.applySubtree @ behavior.js:93
Behaviour.apply @ behavior.js:76
(anonymous function) @ behavior.js:71
window.onload @ behavior.js:125
window.onload @ behavior.js:125
The failing codeine is in repeatable.js line 112. It tries to find a div with
class 'repeatable-insertion-point'.
// do the ones that extract innerHTML so that they can get their original HTML
before
// other behavior rules change them (like YUI buttons.)
Behaviour.specify("DIV.repeated-container", 'repeatable', -100, function(e) {
if(isInsideRemovable(e)) return;
// compute the insertion point
var ip = $(e.lastChild);
while (!ip.hasClassName("repeatable-insertion-point"))
ip = ip.previous();
// set up the logic
object(repeatableSupport).init(e, e.firstChild, ip);
});
What am I doing wrong?
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/e831670f-471a-4f40-9c08-b0d186686194%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.