Author: Alex.Kolonitsky
Date: 2010-04-20 11:57:57 -0400 (Tue, 20 Apr 2010)
New Revision: 16779
Added:
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/templates/_attribute_accessors.ftl
Log:
RF-7826 Migrate A1 components to new CDK
Added:
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/templates/_attribute_accessors.ftl
===================================================================
---
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/templates/_attribute_accessors.ftl
(rev 0)
+++
root/cdk/trunk/plugins/generator/src/main/resources/META-INF/templates/_attribute_accessors.ftl 2010-04-20
15:57:57 UTC (rev 16779)
@@ -0,0 +1,14 @@
+
+ public ${attribute.simpleTypeName} ${attribute.getterName}() {
+ <#if attribute.typeForCasting?contains("Boolean")>
+ return Boolean.valueOf(getStateHelper().eval(Properties.${attribute.name}<#if
attribute.defaultValue?exists>, ${attribute.defaultValue}</#if>).toString());
+ <#elseif attribute.bindingAttribute >
+ return (${attribute.typeForCasting})
getStateHelper().get(Properties.${attribute.name});
+ <#else>
+ return (${attribute.typeForCasting})
getStateHelper().eval(Properties.${attribute.name}<#if
attribute.defaultValue?exists>, ${attribute.defaultValue}</#if>);
+ </#if>
+ }
+
+ public void ${attribute.setterName}(${attribute.simpleTypeName} ${attribute.name}) {
+ getStateHelper().put(Properties.${attribute.name}, ${attribute.name});
+ }
Show replies by date