If statement inside checked attribute of input element in freemarker? -
If statement inside checked attribute of input element in freemarker? -
is possible write in freemarker.
<input type="checkbox" value="available ?" checked="<#if ${status}=='available'>true<#else>false</#if>"/> for throws exception
i want html checkbox checked if status property equals "available".
how in freemarker?
<#if ${status}=='available'> has syntactical error (that error message haven't included points to, i'm certain): can't utilize ${...} within freemarker tags (well, except within string literals, whatever). should <#if status == 'available'>. but, simples solution want is:
checked="${(status == 'available')?c}" or if have older freemarker then:
checked="${(status == 'available')?string('true', 'false')}" freemarker
Comments
Post a Comment