ValidateButton to test all entries in a repeatable

27 views
Skip to first unread message

twr

unread,
Dec 17, 2014, 7:03:38 AM12/17/14
to jenkin...@googlegroups.com
Hi, 

  • I need to check validate a number of fields in one operation with a validateButton
  • this has worked fine with multiple fields
  • I've recently introduced a repeatable section, containing multiple checkboxes
  • I'm easily able to address these by name in the save operation and get the true/false values
  • when I try to pass the same to the validateButton with the 'with' nothing changes in the formData that gets sent (despite referencing the new repeatable stuff)
  • I've tried adding a field declaration in the following places...
    • on the outer entry
    • on the repeatable itself
    • on the nested entry
    • on the checkbox itself

Thanks.

twr

unread,
Jan 5, 2015, 6:44:55 AM1/5/15
to jenkin...@googlegroups.com

So turns out this isn't possible just using the the 'with' attribute of the f:validateButton, even when the repeated entry is bound to a field (either the repeatER or the repeatED component).

I was eventually able to implement this using the f:invisibleEntry and some javascript functions (called on the onclick of my repeated checkboxes) to update the contents of the invisible fields. One can then use the 'with' attribute of f:validateButton to send the value of this hidden field.

Vivek Malhotra

unread,
Dec 20, 2016, 11:46:52 PM12/20/16
to Jenkins Developers
hi

I have a similar situation where i want to validate multiple repeatable entries for duplicity. my repeatable has a f:input in it.  

Is it possible to bind all f:input of a repeatable to a java validate function?

something like we do to validate a field in a descriptor: 

doCheckName(@queryparam String name){

....
....
Reply all
Reply to author
Forward
0 new messages