Author: alexsmirnov
Date: 2011-02-16 19:12:20 -0500 (Wed, 16 Feb 2011)
New Revision: 21719
Modified:
trunk/cdk/generator/src/main/resources/META-INF/templates/java/emptiness-check-method.ftl
trunk/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/templates/testComponent.xml
Log:
RESOLVED - issue RF-10004: CDK: isEmpty method is generated incorrectly
https://issues.jboss.org/browse/RF-10004
Modified:
trunk/cdk/generator/src/main/resources/META-INF/templates/java/emptiness-check-method.ftl
===================================================================
---
trunk/cdk/generator/src/main/resources/META-INF/templates/java/emptiness-check-method.ftl 2011-02-17
00:02:34 UTC (rev 21718)
+++
trunk/cdk/generator/src/main/resources/META-INF/templates/java/emptiness-check-method.ftl 2011-02-17
00:12:20 UTC (rev 21719)
@@ -1 +1 @@
-return object == null;
\ No newline at end of file
+return object == null || object.toString().length() == 0;
\ No newline at end of file
Modified:
trunk/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/templates/testComponent.xml
===================================================================
---
trunk/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/templates/testComponent.xml 2011-02-17
00:02:34 UTC (rev 21718)
+++
trunk/cdk/maven-cdk-plugin/src/it/annotated-component/src/main/templates/testComponent.xml 2011-02-17
00:12:20 UTC (rev 21719)
@@ -48,6 +48,7 @@
</c:when>
<c:otherwise>otherwise content</c:otherwise>
</c:choose>
+ <c:if test='#{empty ""}'>empty content</c:if>
<img src="#{component.attributes['imgAge']}"
alt="#{component.attributes['imgAlt']}"
x:ismap="disabled">
</img>
<ul x:style="listStyle" x:class="listClass"
cdk:passThrough="id title:listTitle onclick:onlistclick
ondblclick:onlistdblclick">