Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
onchange="someFunc(this.form, 'abc')"

Why won't the 'if' tag evaluate a one char string?

Code Block

<ww:if test="#myObj.myString == 'A'">
Why doesn't this work when myString is equal to A?
</ww:if>

OGNL will interpret 'A' as a char type and not a string. Simple solution - flip the double and single quotes.

Code Block

<ww:if test='#myObj.myString == "A"'>
This works!
</ww:if>