You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/09/27 09:28:01 UTC
[jira] [Commented] (OFBIZ-12274) Add FtlWriter.processWithArgs
[ https://issues.apache.org/jira/browse/OFBIZ-12274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17420619#comment-17420619 ]
ASF subversion and git services commented on OFBIZ-12274:
---------------------------------------------------------
Commit dec562dd7d436dd9f7821f3ed36022c5a73577c8 in ofbiz-framework's branch refs/heads/OFBIZ-12274-ftl-with-args from Daniel Watford
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=dec562d ]
Merge remote-tracking branch 'origin/trunk' into OFBIZ-12274-ftl-with-args
> 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
> Assignee: Daniel Watford
> 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)