net.jangaroo.exml.templates.exml_config_class.ftl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of exml-compiler Show documentation
Show all versions of exml-compiler Show documentation
parses an EXML and generates an AS config class
<#-- @ftlvariable name="" type="net.jangaroo.exml.model.ConfigClass" -->
package ${packageName} {
<#list imports as import>
import ${import};
#list>
/**
* ${escapedDescriptionWithoutAts!}
*
* This class serves as a typed config object for the constructor of the class ${componentClassName}
.
* It defines the EXML element <${ns}:${name}>
with xmlns:${ns}="exml:${packageName}"
.
<#if type.extTypeAttribute??>
* Using this config class also takes care of registering the target class under the ${type.extTypeAttribute}
* "${packageName}.${name}"
with Ext JS.
#if>
*
* @see ${componentClassName}
<#if escapedDescriptionAts??>
* ${escapedDescriptionAts}
#if>
*/
[ExtConfig(target="${componentClassName}"<#if type.type??>, ${type.type}#if>)]
<#list annotations as annotation>
[${annotation}]
#list>
public class ${name} extends ${superClassName} {
<#list constants as constant>
/**
* ${constant.escapedDescription!}
*/
public static const ${constant.name}:${constant.type} = ${constant.value};
#list>
<#if type.type??>
public static native function get ${type.type}():String;
#if>
/**
* Use this constructor to create a typed config object for the constructor of the class
* ${componentClassName}
.
<#if type.extTypeAttribute??>
* Using this config class also takes care of registering the target class under the ${type.extTypeAttribute}
* "${packageName}.${name}" with Ext JS.
#if>
*
*
* @see ${componentClassName}
*/
public function ${name}(config:Object = null) {
super(config || {});
}
<#list directCfgs as cfg>
/**
* ${cfg.escapedDescription!}
*/
public native function get ${cfg.name}():${cfg.type};
/**
* @private
*/
public native function set ${cfg.name}(value:${cfg.type}):void;
<#if cfg.name=="id">
[ExtConfig("id")]
/**
* Alias for id
property to make it accessible from MXML.
* @copy #id
* @see #id
*/
public native function set id_(value:${cfg.type}):void;
#if>
#list>
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy