Hi, I'm trying to use validation on a field with a form a bit unusual because it's using a lot of radioBlock and I need relative path. So I set up my validation method like that:
public FormValidation doCheckIdcmsInputFile(@QueryParameter("value") final String value, @RelativePath("../..") @QueryParameter final String fileOrManual, @RelativePath("..") @QueryParameter final String inputtype) It does create the correct checkUrl and checkDependsOn attributes dynamically, the problem is that checker function (hudson-behavior.js:444) is called once on the field before applyNameRef is called. As you may know, this function is setting the ref/nameRef relation ship between radio button and their corresponding block. Therefore the first time it's running, it's failing to resolve the path and causes a javascript error preventing my form to load (because the ../.. go way to high without the ref/nameRef). If I stop in debug the first run and change the relative path to make it work without ref/nameRef, then after ref/nameRef did it job my relative path work perfectly fine. I'm using Jenkins 1.638. Any of you already encountered this checke/nameRef condition race when using relative path? How did you solve it? Here is my form for your information, I removed all unnecessary parts to make it clearer for this question: <f:radioBlock name="fileOrManual" value="dcsfile" id="dcsfile" title="Use an existing DCS Build File"> <f:nested> <div name="dcsfileinput" id="dcsfileinput"> <input name="file" type="file" jsonAware="true" /> </div> </f:nested> </f:radioBlock> <f:radioBlock name="fileOrManual" checked="true" value="manualinput" id="manualinput" title="Build a DCS Build File"> <f:nested> <f:section title="Sources"> <f:radioBlock name="inputtype" value="gsa" checked="true" title="GSA"><f:nested> <f:entry field="inputfile" title="Ditamap's path in the zip"> <f:textbox /> </f:entry> <f:entry name="inputpath" title="Zip's path in GSA"> <f:textbox/> </f:entry> </f:nested></f:radioBlock> <f:radioBlock name="inputtype" value="filenet" title="IDCMS"><f:nested> <f:entry field="idcmsInputFile" title="Ditamap's path in IDCMS"> <f:textbox autocomplete="on"/> </f:entry> </f:nested></f:radioBlock> </f:section> </f:nested> </f:radioBlock> Thanks for your help and I hope I was in the right group to ask that, not sure if I should open a bug in the JIRA as well, I thought I would rather ask in the group first. -- 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 jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CALuJxw%2BCfi-x8mmkcWJyyX4Cs%3Do9v%2BaU2YcWU2L7T9MN5Myfyw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.