[jira] Commented: (OFBIZ-203) Freemarker postal address formatter macro

Posted by Nicolas Malin (Jira) on
URL: http://ofbiz.116.s1.nabble.com/jira-Created-OFBIZ-203-Freemarker-postal-address-formatter-macro-tp171329p171336.html

    [ http://issues.apache.org/jira/browse/OFBIZ-203?page=comments#action_12434332 ]
           
David E. Jones commented on OFBIZ-203:
--------------------------------------

I'm not going to try to convince you of this Leon, and what I was trying to express is that while I have objections, your job is not to convince me.

My guess is that the reaction of OFBiz users who are customizing templates that have this transform in them will be to first figure out what it is doing, then mutter for a few minutes as they comment it out and drop in some quick HTML tags to format it the way they want. I say this because this feature is a complex solution to a not so complex problem. We've had enough push back for complex solutions to more complex problems, like the form widget, and given that we have FTL templates so that people can easily customize them, this goes a bit in the other direction.

I have no problem with this going in if:

1. it is moved to the party component to resolve the framework dependency discussed
2. we get some positive feedback from OFBiz users, which you can solicit on the mailing list and just point people to this issue

-David


> Freemarker postal address formatter macro
> -----------------------------------------
>
>                 Key: OFBIZ-203
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-203
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: New Feature
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Leon Torres
>            Priority: Minor
>         Attachments: ofbizPostalAddress.patch, test.bsh, test.ftl
>
>
> Define a macro <@ofbizPostalAddress address=inputMapOrGenericValue/>  to format postal addresses in a consistent, flexible way with attention to country postal formats.  The output should support both HTML and Text formats.  It should be easily extensible, with future XSL:Fo support in mind.
> I created an implementation as an exercise to learn the freemarker template system.  It was designed with future macros in mind.  Currently implemented are rules for generating US, German and Royal Mail format postal addresses.  (The address country determines the format.)  Also provided are test.bsh and test.ftl so people may try them out.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira