You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@freemarker.apache.org by "Siegfried Goeschl (Jira)" <ji...@apache.org> on 2021/10/03 16:03:00 UTC

[jira] [Created] (FREEMARKER-195) [freemarker-generator] Improve exposure of DataSources using TemplateHashModelEx2

Siegfried Goeschl created FREEMARKER-195:
--------------------------------------------

             Summary: [freemarker-generator] Improve exposure of DataSources using TemplateHashModelEx2
                 Key: FREEMARKER-195
                 URL: https://issues.apache.org/jira/browse/FREEMARKER-195
             Project: Apache Freemarker
          Issue Type: Improvement
            Reporter: Siegfried Goeschl
            Assignee: Siegfried Goeschl


Have another take on it since I failed at the first iteration

{noformat}
It is doable, like the XML DOM wrapped does that. you just need to
implement both TemplateHashModel (TemplateHashModelEx2 preferably) and
TemplateSequenceModel. I guess the problem was that you also wanted to
expose the methods. That's not possible since in FTL (and unlike in
Java, but like in many other languages) there's no separate namespace
for method names. So, either you move those to somewhere, like under
tools.dataSourceOperations, or you stupport the ?api built-in, so once
can do dataSources?api.find(...).
{noformat}




--
This message was sent by Atlassian Jira
(v8.3.4#803005)