[
https://issues.apache.org/jira/browse/OFBIZ-12274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17378445#comment-17378445
]
Xin Wang commented on OFBIZ-12274:
----------------------------------
Hi [~danwatford],
I have attached a patch to update RenderableFtlMacroCall to using with_args.
It is mostly just a POC, as I'm not quite conformable with my modification.
I think you are more suitable to do that job, so feel free to do anything based
on this patch. :D
> Add FtlWriter.processWithArgs
> -----------------------------
>
> Key: OFBIZ-12274
> URL: https://issues.apache.org/jira/browse/OFBIZ-12274
> Project: OFBiz
> Issue Type: Improvement
> Affects Versions: Trunk
> Reporter: Xin Wang
> Priority: Major
> Attachments:
> 0001-Rendering-RenderableFtlMacroCall-with-with_args.patch
>
>
> When calling FTL macro from Java side is needed, instead of crafting a
> template string with carefully escaping. with newly added
> FtlWriter.processWithArgs, we can pass parameters using an environment
> variable, and then invoke macro with "with_args" builtin. With this approach,
> it both makes cleaner code and free of fragile escaping.
> As an example, I also changes MacroFormRenderer.makeHyperlinkString to make
> use of this new facility.
> I have created a GitHub PR for this:
> https://github.com/apache/ofbiz-framework/pull/307
--
This message was sent by Atlassian Jira
(v8.3.4#803005)