Author: nbelaevski
Date: 2008-01-12 15:24:42 -0500 (Sat, 12 Jan 2008)
New Revision: 5335
Modified:
trunk/cdk/generator/src/main/resources/META-INF/templates12/componentTag.vm
trunk/cdk/generator/src/main/resources/META-INF/templates12/taglib.vm
Log:
http://jira.jboss.com/jira/browse/RF-1818
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates12/componentTag.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/componentTag.vm 2008-01-12
20:24:37 UTC (rev 5334)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/componentTag.vm 2008-01-12
20:24:42 UTC (rev 5335)
@@ -40,12 +40,6 @@
${component.simpleClassName} comp = (${component.simpleClassName}) component;
#foreach( $prop in $component.properties )
#if( !$prop.existintag && !$prop.hidden)
- #if(!$prop.el)
- if(null != this._${prop.name} && !this._${prop.name}.isLiteralText()){
- throw new IllegalArgumentException("Component ${component.name} with Id " +
component.getClientId(getFacesContext()) +" not allowed EL expression for property
${prop.name}");
- }
- #end
-
#if($prop.elonly)
if(null != this._${prop.name} && this._${prop.name}.isLiteralText()){
throw new IllegalArgumentException("Component ${component.name} with Id " +
component.getClientId(getFacesContext()) +" allows only EL expressions for property
${prop.name}");
@@ -84,6 +78,7 @@
((${component.simpleClassName})component).${prop.setterName}(this._${prop.name});
}
#else
+ #if ($prop.el)
if (this._${prop.name} != null) {
if (this._${prop.name}.isLiteralText()) {
try {
@@ -111,6 +106,17 @@
component.setValueExpression("${prop.name}", this._${prop.name});
}
}
+ #else
+ #if (!${prop.simpleType})
+ if (this._${prop.name} != null) {
+ #end
+
+ comp.${prop.setterName}(this._${prop.name});
+
+ #if (!${prop.simpleType})
+ }
+ #end
+ #end
#end
#end
#end
Modified: trunk/cdk/generator/src/main/resources/META-INF/templates12/taglib.vm
===================================================================
--- trunk/cdk/generator/src/main/resources/META-INF/templates12/taglib.vm 2008-01-12
20:24:37 UTC (rev 5334)
+++ trunk/cdk/generator/src/main/resources/META-INF/templates12/taglib.vm 2008-01-12
20:24:42 UTC (rev 5335)
@@ -21,6 +21,7 @@
#end
#else
<rtexprvalue>false</rtexprvalue>
+ <type>${prop.classname}</type>
#end
</attribute>
#if( $prop.alias )