formatNumber"
From Documentation
m |
m |
||
Line 15: | Line 15: | ||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?> | <?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?> | ||
<zk> | <zk> | ||
− | < | + | <label value="${c:formatNumber(2332315231, '$ ###,###,###.00')}" /> |
</zk> | </zk> | ||
</source> | </source> |
Revision as of 07:41, 2 May 2012
The default method:
String formatNumber(Object number, String pattern);
Formats a number (Integer, BigDecimal...) into a string with the given pattern.
For example,
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk>
<label value="${c:formatNumber(2332315231, '$ ###,###,###.00')}" />
</zk>
There is another extended built in function,
String formatNumber(Object number, String pattern, Locale locale);
Formats a number (Integer, BigDecimal...) into a string with the given pattern and locale.
You can define a method to use this function by xel-method
Parameters:
In both default and extended function:
- number - the Number to format
- pattern - the pattern to apply
In extended function only:
- locale - the locale to apply
Version History
Version | Date | Content |
---|---|---|
6.0.1 |