Help to create Freemarker Based Component

Jayaram Ponnusamy
edited April 27, 2020 in TeamSite #1
Hi,
I am new to TeamSite Development, just started creating the component by using XSLT. I header that the Teamsite is supporting Freemarker Template also.
Can anyone help me how to create simple freemarker template.


I have a Helloworld.java using org.dom4j.Document i have set two values name & message, then finally i returned the doc.
In the Component using XSLT Template
I retrieved all the nodes and returned it on Page. like below, How can we change this to freemarker template?
Appearances Field:
  <xsl:template match="/">
    <div>
      <p><b>name is: <xsl:value-of select="/Properties/Data/Result/person/name"/></b></p>
     <p><b>Hobby</b>: <xsl:value-of select="/Properties/Data/Result/person/message"/></p>
    </div>
  </xsl:template>

Content XML Field:
<Data>
  <External>
    <Object Scope="local">com.mycomponents.HelloWorld</Object>
    <Method>sayHello</Method>
  </External>
</Data>

Thanks
Jay
TeamSite Developer Resources

  • Docker Automation

  • LiveSite Content Services (LSCS) REST API

  • Single Page Application (SPA) Modules

  • TeamSite Add-ons

If you are interested in gaining full access to the content, you can register for a My Support account here.
image
OpenText CE Products
TeamSite
APIs