-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I found the feature has been added here
But when i try to use, it says property not found
<listfooter>
<label format="#,###.##"
value="@load(vm.searchTotals.totalInsPayments)" />
</listfooter>
http://www.zkoss.org/javadoc/latest/zk/org/zkoss/zul/Label.html
Sorry to say that there is no format there.
@Chill: right, there is no additional "format" attribute on a label.
You can format a label using the c:formatNumber EL core-method directly inside the EL.
You can also call these methods from mvvm @load bindings.
Robert
I just followed the example from my link above and created this zk fiddle
Is there anything unclear about the documentation?
Sorry i didn't see the link properly. But we need to change format as
<label value="@load(c:formatNumber(vm.number, '$#,###.00'))" />
otherwise number without decimal it not showing two zero after decimal
I don't see a problem, just do it... java supports different format strings ;) http://docs.oracle.com/javase/7/docs/api/java/text/DecimalFormat.html
cor3000 ( 2014-02-13 07:17:03 +0800 )editAsked: 2014-01-20 13:29:56 +0800
Seen: 59 times
Last updated: Jan 23 '14
How to do ${c:l(@load(vm.name)} correctly?
how to specify line break in label. [closed]
Label text does not wrap in a "scrollview"
How to include a single special utf-8 character in a treecol label string?
Placeholder with phonemasking in IE11 Browser not working
how to change the style of portion of Label's value
How to get a label value for all the different international label file?