My guess is that instance.tagFile is no longer null because the previous
form posting set the value to an empty string.

try checked="${not empty instance.tagFile}" or maybe it's the other way
around (${instance.tagFile not empty}), those jexl expressions confuse me
sometimes ;)

/B

On Tue, Mar 8, 2016 at 11:31 AM, Mads Nielsen <[email protected]> wrote:

> Hi Guyes,
>
> I have a problem. What im trying to do is to have Jenkins render a
> radio-button group with mutually exclusive options in a Job property. This
> work fine when the job is getting configured.
>
> But when i reload the page...i get this:
>
>
> ​Even though i have not selected the File from workspace option, it still
> renders the block under the radio button on page load.
>
> Here is my jelly code, what am i doing wrong? I checked that my
> expressions that evaluate the checked state are correct.
>
> <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler"
> xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson"
> xmlns:f="/lib/form">
>     <f:optionalBlock name="on" checked="${instance.on}" title="DataDog
> tagging" inline="true">
>         <f:radioBlock title="Properties content" name="choice"
> checked="${instance.tagging != null}">
>             <f:entry title="Properties" field="tagging">
>                 <f:textarea/>
>             </f:entry>
>         </f:radioBlock>
>         <f:radioBlock title="File from workspace" name="choice"
> checked="${instance.tagFile != null}">
>             <f:entry title="File" field="tagFile">
>                 <f:textbox/>
>             </f:entry>
>         </f:radioBlock>
>     </f:optionalBlock>
> </j:jelly>
>
>
> Best regards,
> Mads
> [image: ____________________________________________________________]
> Mads Nielsen
> Consultant
> [email protected]
> +45 50 98 18 09 <+45%2050%2098%2018%2009>
> Skype: inkspot
> Praqma
> www.praqma.com
> DK: CPH, Aarhus, Allerod
> NO: OSL
> SE: STHLM
> +45 36 PRAQMA <+4536772762>
>
> <http://www.josra.org/blog/An-automated-git-branching-strategy.html?src=mailbanner>
>
> --
> 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/CAFariusD05U9jxMLfHD%2BK7xaP40THCFTBOJSwq0H3MowXYE3nA%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/CAFariusD05U9jxMLfHD%2BK7xaP40THCFTBOJSwq0H3MowXYE3nA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Robert Sandell
*Software Engineer*
*CloudBees Inc.*

-- 
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/CALzHZS1T34ZTq_b3GZGpPVs%3Dt6B6%3D%2BZFwX4P6267DJ27WhqaMw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to