Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-23383

Ability to format number xproperties

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 16.10.9
    • Old Core
    • None
    • Unknown

    Description

      Right now all numbers are displayed in the same way by default, similarly for all locales and without any way for users to force using a NumberFormat (see https://docs.oracle.com/javase/8/docs/api/java/text/NumberFormat.html).

      This issue is about:

      • Display number xproperties using a default format that makes sense for a given Locale
      • Add an admin UI preference for forcing number formats to use (could be different for Long or Double/Float for example)
      • Implement the display either in NumberClass#displayView() or inside a displayer_* template

      The workaround for now, for users, is to use a custom displayer for the xproperty and use $numbertool.format("...format...", $value) to format the number.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: