cancel
Showing results for 
Search instead for 
Did you mean: 

form checkbox

opal
Champ in-the-making
Champ in-the-making
Hi,

I've a problem with a checbkox. In the context I store a boolean variable bwVideo with true value. Then I need to display it using <input type="checkbox"> and don't know how to pass the variable. The checkbox is always unchecked and I've already checked if the value is set to true. Does anybody have any idea how to resolve this issue?
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
Hi,

How exactly are you setting the checkbox value? Using "CHECKED"?

Try something like this:


<input type="checkbox" name="bwVideo" ${(bwVideo ? 'CHECKED' : ''} />

opal
Champ in-the-making
Champ in-the-making
Thank You very much, have forgotten about ternary operator in EL. BTW: is it now possible only to use plain EL in forms?

frederikherema1
Star Contributor
Star Contributor
The EL in forms uses JUEL 2.2, this includes passing method parameters as well.