-
31 Aug 2012 10:54 AM #1
XTemplates does not appear to recognize isXXX boolean methods on beans
XTemplates does not appear to recognize isXXX boolean methods on beans
I don't know this is by design or a bug, but we have a Java bean that defines a method "public boolean isFoo() {...}," and GWT compilation fails on our XTemplates because when the object serialization is done for the bean, the isXXX method is not defined and both <tpl if="foo"> and <tpl if="isFoo"> do not work and return a null for the conditional, i.e. "if(null)."
If I define a "public boolean getFoo() {...}" everything works.
According to the JavaBeans spec, the "is" prefix is valid.
-
5 Sep 2012 9:29 AM #2
Thanks for this bug report - I've managed to reproduce this, and have a workaround to suggest:
Instead of referencing the property directly, with or without the 'is' prefix, add the object first. This may not always be possible. So instead of just <tpl if="foo">, do something like <tpl if="obj.foo">.
-
25 Sep 2012 12:56 PM #3
This has been fixed in SVN and will be available in the next release.
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTGWT-2403
in
3.0.2.


Reply With Quote