Why does the following code always emit ‘yes’ (in HTML) even when sel has a different value other than ‘audio’? (I’ve logged the values of sel and confirmed different values.)
This is my day 1 on Play. So, I may be doing something really stupid.
${sel='audio'?'yes':'no'}
I don’t know the Groovy templates that well, but I think it should be like this:
Your code:
means; if ‘audio’ (a string that is not null will always be “true”) then sel = ‘yes’ otherwise ‘no’, so it will never be ‘no’.