On Tue, Jan 17, 2017 at 7:55 PM,  <[email protected]> wrote:
> When updating a plugin to support pipeline script, how do I handle an
> optionalBlock section?

Do not use `f:optionalBlock`. This is a low-level control. Do not
refer to `JSONObject` either. All this is old-style deprecated form
binding.

Use a high-level control like `f:optionalProperty` for nullable
structs (`ui-samples-plugin` has an example), or simple independent
`f:checkbox`es for `boolean` properties (`doCheck*` form validation
can reject invalid combinations).

Also use `@DataBoundSetter` for any property with a plausible default.

-- 
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/CANfRfr0KKVKGvJzvgBBAEGdDNshQ%3DY8wgtrzyXsuPst4y60fag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to