Defaulting a jelly optionalBlock checkbox to checked/true

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Defaulting a jelly optionalBlock checkbox to checked/true

Khushboo Sancheti
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/8a268659-e210-4d3d-b6c7-681c802401c4%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Defaulting a jelly optionalBlock checkbox to checked/true

Ulli Hafner
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 <[hidden email]>:

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

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/FB46AEFE-F475-4D3D-AF43-A82D953A0FC8%40gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Defaulting a jelly optionalBlock checkbox to checked/true

Khushboo Sancheti
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 <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="3-NPSbugEAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">k...@...>:

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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="3-NPSbugEAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkin...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-dev/8a268659-e210-4d3d-b6c7-681c802401c4%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/8a268659-e210-4d3d-b6c7-681c802401c4%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-dev/8a268659-e210-4d3d-b6c7-681c802401c4%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-dev/8a268659-e210-4d3d-b6c7-681c802401c4%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/f386ee68-cb94-43bb-bcdd-248dd3e26660%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Defaulting a jelly optionalBlock checkbox to checked/true

Ulli Hafner
It would help if you would post the relevant part of your jelly file

Am 21.01.2020 um 23:24 schrieb Khushboo Sancheti <[hidden email]>:

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 <[hidden email]>:

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


--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/f386ee68-cb94-43bb-bcdd-248dd3e26660%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/ADF2AED0-0222-489A-B03D-1D42EA8769FD%40gmail.com.