czw., 25 maj 2023 o 09:12 Greg Huber <gregh3...@gmail.com> napisał(a):
>
> >> <s:if test='bean.type.equals("2")'>
>
> Thanks, need to try and remembered this! Would explain why some of my item 
> types don't select/work as expected.

I would use "==" to be sure, as documented in
https://ognl.orphan.software/language-guide#operators

"e1 == e2"; e1 eq e2 - Equality test

Equality is tested for as follows. If either value is null, they are
equal if and only if both are null. If they are the same object or the
equals() method says they are equal, they are equal. If they are both
Numbers, they are equal if their values as double-precision floating
point numbers are equal. Otherwise, they are not equal. These rules
make numbers compare equal more readily than they would normally, if
just using the equals method.

So the final version is:

<s:if test='bean.type == "2"'>


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to