Re: Boolean formatting
"Smerek, Martin" <[email protected]> Thu, 25 Apr 2013 12:12:43 +0000
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <9CE983B28C09074CB8B490EB668FA72B0112F4@corpmail2k10-2.corp.netledger.com> |
<html><body>Hi Daniel, Sorry for late response. Our standard format is Yes/No (for English). You are right that we could solve this using ApplicationDomainTypeFormatter, however, we think that introducing such a setting might be beneficial for other FreeMarker users too. Thank you very much, Martin -----Original Message----- From: Daniel Dekany [mailto:[email protected]] Sent: Wednesday, April 17, 2013 10:31 PM To: FreeMarker-user Subject: Re: [FreeMarker-user] Boolean formatting Tuesday, April 16, 2013, 3:35:58 PM, Smerek, Martin wrote: > Hi all, > > Even though FAQ > http://freemarker.sourceforge.net/docs/app_faq.html#faq_number_boolean > _formatting says "Unlike numbers, booleans has no commonly accepted > format, not even a common format within the same page.", there is > commonly accepted format for Boolean in our app universe. For the common format, there's the "boolean_format" setting, however, AFAIR, it still demands a ?string after the boolean, only you don't have to add the format as parameter if the "boolean_format" was set. I suppose that's your problem here. And I guess FM is overly strict here, so maybe I should just allow this conversion without ?string, if the "boolean_format" was set. I wonder if it's backward-compatible though... probably it had to be yet another setting whose default only changes with 2.4 or so. OTOH... what the commonly accepted format is in your app? Because, just like with numbers, there's the problem that the proper format depends on the app-domain meaning of the boolean. Like for something maybe it's yes/no, for something else it's on/off. Then it's just another case that can be solved with ApplicationDomainTypeFormatter. > Would it be > possible to add configuration flag (in Configurable class) which would > override current behavior (ending with an error) and allowed printing > out Boolean directly according to specified boolean format? > Would anyone else find this helpful? > Thanks, > Martin > > > NOTICE: This email and any attachments may contain confidential and > proprietary information of NetSuite Inc. and is for the sole use of > the intended recipient for the stated purpose. Any improper use or > distribution is prohibited. If you are not the intended recipient, > please notify the sender; do not review, copy or distribute; and > promptly delete or destroy all transmitted information. Please note > that all communications and information transmitted through this email > system may be monitored by NetSuite or its agents and that all > incoming email is automatically scanned by a third party spam and filtering service. -- Thanks, Daniel Dekany ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ FreeMarker-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freemarker-user NOTICE: This email and any attachments may contain confidential and proprietary information of NetSuite Inc. and is for the sole use of the intended recipient for the stated purpose. Any improper use or distribution is prohibited. If you are not the intended recipient, please notify the sender; do not review, copy or distribute; and promptly delete or destroy all transmitted information. Please note that all communications and information transmitted through this email system may be monitored by NetSuite or its agents and that all incoming email is automatically scanned by a third party spam and filtering service </body></html> ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr _______________________________________________ FreeMarker-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freemarker-user