Hey,
I was using a the inline=”true” property on config.jelly to get the parsed
parameters from config.jelly to my @DataBoundConstuctor but I now must
remove this property.
So the problem is, How can I adapt my constructor to receive parsed
parameters as well as JSONObject? Or what method should I call to handle
the JSONObject?
I was trying with “@Override public boolean configure(…)” but it seems that
method is only for global configuration, correct?
What is the simplest approach to solve this problem?
Config.jelly:
__________________________________________________________________________________________
<f:entry title="${%installation}" field="installation">
<f:select/>
*</f:entry>*
<f:entry title="${%startingURL}" field="startingURL">
<f:textbox *clazz*="required"/>
*</f:entry>*
<f:section title="" name="genReport">
<f:optionalBlock title="${%generateReport}"
field="generateReport"
<!--inline=”true” -->>
*<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>*
__________________________________________________________________________________________
With the inline=”true”, this is working:
*@DataBoundConstructor*
*public** XBuilder*(*String* installation,* String*
startingURL,*boolean* generateReport, *String* reportName, *boolean*
htmlReport, *boolean* pdfReport)
Without, “generateReport” is a JSONObject and thus the constructor is not
working.
I figured I’d want something like this:
*JSONObject* *json* =
formData.getJSONObject("genReport");
generateReport =
json.getBoolean("generateReport");
reportName =
json.getString("reportName");
htmlReport =
json.getBoolean("htmlReport");
pdfReport =
json.getBoolean("pdfReport");
But which method do I use to implement this?
Thanks in advance.
--
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/7608efa2-92fc-47ae-ad45-f1844c2bb663%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.