jsf 2 - how we can get only number skipping fraction in jsf f:convertNumber? -
i have inputtext takes value user , bound number. if value "6000.0", subsequent pages show "6000". there way format such if user enters fractional number, show below?
examples: user enters "35545.9" show "35545" user enters "5546.1" show "5546" user enter "7558.767" show 7558 user enter "548.7943" show 548
you can use:
<h:inputtext value="#{receipt.amount}" > <f:convertnumber minfractiondigits="2" /> </h:inputtext>
or
<h:inputtext value="#{receipt.amount}" > <f:convertnumber pattern="#0.00" /> </h:inputtext >
to add fraction digits
Comments
Post a Comment