Hi,
I'm trying to write a jelly file that will output different fileds depending on 
which radio button is clicked.
I managed to do this by having f:nested nodes inside the f:radioBlock nodes, 
but the problem with this is that I need 2 DataBound constructor and Stapler 
doesn't allow this.

This is my code: 
https://github.com/clguimanMSFT/windows-azure-storage-plugin/commit/0d66eaf4b85034916ddb7add01a32435e8a9a160

If I'm using the DataBound constructor that gets all the fields (the 
uncommented one) the Stapler is going to throw and exception, because it can't 
find the right constructor (javax.servlet.ServletException: 
java.lang.RuntimeException: Failed to instantiate class 
com.microsoftopentechnologies.windowsazurestorage.AzureStorageBuilder from 
{"storageAccName":"clguimanmainstorage","downloadType":{"value":"container","containerName":"abc"},"includeFilesPattern":"*.txt","excludeFilesPattern":"","downloadDirLoc":"","flattenDirectories":false,"includeArchiveZips":false,"stapler-class":"com.microsoftopentechnologies.windowsazurestorage.AzureStorageBuilder","$class":"com.microsoftopentechnologies.windowsazurestorage.AzureStorageBuilder"})

If I'm using the commented constructor everything works fine, but then I'd need 
a second constructor for the other radio button option, but Stapler doesn't 
allow to have 2 databound constructors.

Googling around I found some other project that does the same thing as me but 
for some reasone it seems to work for them 
(https://github.com/awslabs/aws-device-farm-jenkins-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/awsdevicefarm/AWSDeviceFarmRecorder/config.jelly#L33
 & 
https://github.com/awslabs/aws-device-farm-jenkins-plugin/blob/master/src/main/java/org/jenkinsci/plugins/awsdevicefarm/AWSDeviceFarmRecorder.java#L136)

Any ideas on what I'm doing wrong?

Thanks,

Claudiu

-- 
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/CY1PR0301MB16603BBF997801EDC956E281D79A0%40CY1PR0301MB1660.namprd03.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to