Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-12274

Add FtlWriter.processWithArgs

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Trunk
    • None
    • None
    • None
    • Patch

    Description

      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

      Attachments

        Activity

          People

            danwatford Daniel Watford
            dram Xin Wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: