|
|
|
Re: Doubt in Xpand template [message #498130 is a reply to message #498126] |
Sat, 14 November 2009 20:19 |
|
Hello Zakir,
one thing that comes into my mind is to call XpandFacade using a java extension.
another possibility is to move the problem to the workflow using the cartrige mechanisms or moving to template names to properties
e.g. (from a oaw 4.3.1 sample)
<property name="template" value="template::Template::main" />
<!-- generate code -->
<component class="org.openarchitectureware.xpand2.Generator">
<metaModel idRef="mm"/>
<expand
value="${template} FOR model" />
<outlet path="${src-gen}" >
<postprocessor class="org.openarchitectureware.xpand2.output.JavaBeautifier" />
</outlet>
</component>
Regards Christian
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
|
|
|
|
Re: Doubt in Xpand template [message #498162 is a reply to message #498161] |
Sun, 15 November 2009 09:46 |
|
so why don't you call a java excetion as replacement
for
«EXPAND this.definitionName FOREACH entities()»
that invokes the template dynamically
«invoketemplate(this.definitionName, entities())»
with
XpandFacade facade = XpandFacade.create(execCtx);
facade.evaluate("template::Start::main", inputModel);
replaced by someting like
XpandFacade facade = XpandFacade.create(execCtx);
facade.evaluate(templateName, inputModel);
in the java extenstion
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
[Updated on: Sun, 15 November 2009 09:52] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04113 seconds