Defaulting a jelly optionalBlock checkbox to checked/true

37 views
Skip to first unread message

Khushboo Sancheti

unread,
Jan 21, 2020, 4:38:22 PM1/21/20
to Jenkins Developers
How can one default the optionalBlock checkbox to be checked? Jelly doesn't seem to provide a "default" attribute for optionalBlock like it does for a normal checkbox ...

Ullrich Hafner

unread,
Jan 21, 2020, 4:52:44 PM1/21/20
to Jenkins Developers
Seems that nobody required it up to now. Can’t you use the `checked` state accordingly? I.e. if your instance is `null` set it to `true`.

Am 21.01.2020 um 22:36 schrieb Khushboo Sancheti <k...@stackrox.com>:

How can one default the optionalBlock checkbox to be checked? Jelly doesn't seem to provide a "default" attribute for optionalBlock like it does for a normal checkbox ...

--
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-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/8a268659-e210-4d3d-b6c7-681c802401c4%40googlegroups.com.

Khushboo Sancheti

unread,
Jan 21, 2020, 5:28:01 PM1/21/20
to Jenkins Developers
Hmm, thanks! Not a jelly expert by any means, trying to use a set_if to set the value of a variable based on instance == null or not, and use that as the checked value. Not very successful yet.
Am 21.01.2020 um 22:36 schrieb Khushboo Sancheti <k...@stackrox.com>:

How can one default the optionalBlock checkbox to be checked? Jelly doesn't seem to provide a "default" attribute for optionalBlock like it does for a normal checkbox ...

--
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 jenkin...@googlegroups.com.

Ullrich Hafner

unread,
Jan 22, 2020, 4:18:17 AM1/22/20
to Jenkins Developers
It would help if you would post the relevant part of your jelly file

To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/f386ee68-cb94-43bb-bcdd-248dd3e26660%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages