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

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -