I'm drowning, I kept digging as I didn't find the necessary information to 
implement your suggestion...

config.jelly:
_____________________________________________________________________
    <f:section title=""> 
        <f:optionalBlock title="${%generateReport}"  field="generateReport">
            <f:entry>
                        
                      <f:entry field="reportName" title="Report title">
                      <f:textbox/>
                  </f:entry>
                  
                      <f:entry field="htmlReport" title="HTML Report">
                      <f:checkbox/>
                  </f:entry> 
                  
                  <f:entry field="pdfReport" title="PDF Report">
                      <f:checkbox/>
                  </f:entry>
      
            </f:entry>
        </f:optionalBlock>
     </f:section>
_____________________________________________________________________


Builder:
_____________________________________________________________________
    @DataBoundSetter
    public void setGenerateReport(JSONObject formData){    
        if(!formData.isNullObject() && !formData.isEmpty()){
            this.generateReport = true;    
            this.reportName = formData.getString("reportName");
            this.htmlReport = formData.getBoolean("htmlReport");
            this.pdfReport = formData.getBoolean("pdfReport");    
        }
        else
            this.generateReport = false;       
    }
_____________________________________________________________________



the problem now is that if the optionalBlock is unchecked (with data in the 
fields) and then checked, the values are lost (not being properly persisted)

any suggestion on how to fix this?

-- 
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/3074c717-780b-4129-9abf-5f67748555b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to