May 9, 2012

Struts - Formating Text, Date or Number


Formating Pattern

format.time = {0,time}
format.number = {0,number,#0.0##}
format.percent = {0,number,##0.00'%'}
format.money = {0,number,\u00A4##0.00}

Formatting a number

<s:property value="getText('{0,number,#,##0.00}',{product.price})" />

No comments: