grails gsp test evaluates to false, but block is still rendered. Why?

Posted by ????? on Stack Overflow See other posts from Stack Overflow or by ?????
Published on 2010-05-12T01:14:38Z Indexed on 2010/05/12 10:34 UTC
Read the original article Hit count: 437

Filed under:
|
|

I'm baffled with Grails test operator.

This expression:

<g:if test="${!(preferences.displayOption.equals('ANA') || preferences.displayOption.equals('FLOP'))} ">
  ${!(preferences.displayOption.equals('ANA') || preferences.displayOption.equals('FLOP'))}
</g:if>

prints

false

How can that be? I'm printing the exact same condition I'm testing for!

even though I'm certain the test condition evaluates to 'false' because it prints false in the very next line, the statements inside the g:if are being rendered.

Anu ideas as to what's going on.

© Stack Overflow or respective owner

Related posts about grails

Related posts about gsp