This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-ee0f0eed-a196-4127-bf49-4b0f4dc9658f XWIKI-23383 Open

Ability to format number xproperties

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-075e0bbc-b6ba-44ba-ae38-a9992f567a17 Vincent Massol created this issue on 16/Jul/25 12:04
 
Summary: Ability to format number xproperties
Issue Type: cid:jira-generated-image-avatar-ee0f0eed-a196-4127-bf49-4b0f4dc9658f Improvement
Affects Versions: 16.10.9
Assignee: Unassigned
Components: Old Core
Created: 16/Jul/25 12:04
Priority: cid:jira-generated-image-static-major-bdf13363-5da5-4f23-b6e2-2dc9728ec9bc Major
Reporter: Vincent Massol
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.